Nevron Forum

Provide two color in a rectangle

https://www.nevron.com/Forum/Topic12985.aspx

By shweta jain - Tuesday, February 4, 2020

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 - Tuesday, February 4, 2020

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 - Tuesday, February 4, 2020

How to create rectangle without border?
By Nevron Support - Wednesday, February 5, 2020

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);