Provide two color in a rectangle


https://www.nevron.com/Forum/Topic12985.aspx
Print Topic | Close Window

By shweta jain - 4 Years Ago
Hello
I want to divide a rectangle into two color. For creating rectangle I have used NGraphicsPathSeries.
How can I fill rectangle like I have attached image.https://www.nevron.com/forum/uploads/images/e5be8cce-9e59-45d1-acf4-fa6c.png
By Nevron Support - 4 Years Ago
Hi Shweta,
Each graphics path can only have one fill and border. This is by design. In order to draw the above you need to have three graphics path series - two without border and with different colors representing the bars and another one without filling representing the border. Let us know if you have any questions.
By shweta jain - 4 Years Ago
How to create rectangle without border?
By Nevron Support - 4 Years Ago
Hi Shweta,
Simply assign the StokeStyle of the graphics path to null or to stroke with zero width:
graphicsPathSeries.StrokeStyle = new NStrokeStyle(0.0f, Color.Black);