Unable to draw 2D closed shapes


Author
Message
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi,
The shape series can draw arbitrary shape - in fact you can draw everything with the shape or custom series as they both support GraphicsPath based rendering. This includes open and closed figures, figures with holes, figures with multiple contours etc. so it is not limited in any way to simple shapes. The following link in MSDN shows the available methods of the graphics path class:

https://msdn.microsoft.com/en-us/library/system.drawing.drawing2d.graphicspath(v=vs.110).aspx

(in case you want to use the Custom painting functionality). In case you decide to use the shape series you can take a look at the following topic:
http://helpopenvision.nevron.com/#Graphics%20Paths.html

Hope this helps - let us know if you meet any problems or have any questions.





Best Regards,
Nevron Support Team


Fan-Jiang Zeng
Fan-Jiang Zeng
 
Group: Forum Members
Posts: 7, Visits: 17
Thank you for your reply, but your solution still cannot solve my problem. I want to draw an irregular closed shape which contains a series of points with known coordinates. With the Graphics Path class I can only draw predefined shapes such as ellipses and rectangles. Do you have other suggestions? Thanks again!
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi,

Currently you can achieve this using a custom series - check out the following example - All Examples \ Chart Gallery \ Custom \ Custom Series - using this approach you can render arbitrary shapes. The upcoming 2016.1 release will have a series called graphics path series which allows you to draw any type of shape like a regular series.


Best Regards,
Nevron Support Team


Fan-Jiang Zeng
Fan-Jiang Zeng
 
Group: Forum Members
Posts: 7, Visits: 17
I want to draw 2D closed shapes (such as a triangle, a circle, etc) with which a single color is filled, but I could not find a suitable class to finish this task after trying all the provided chart types. 
My first attempt is the Line series, but it could not be filled with colors.
My second attempt is the grid/mesh/triangle surface series with DrawFlat set to true, but it didn't work since the thickness of a 2D shape is 0, thus I couldn't see it in the chart.
Finally I tried the shape class, and sadly it only supports limited pre-defined shapes. But I need to draw irregular shapes - with arbitrary outlines.
Are there any suitable classes that can satisfy my requirements? Thank you!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search