Profile Picture

How to show length of rectangle in the chart

Posted By shweta jain 5 Years Ago
Author
Message
shweta jain
Question Posted 5 Years Ago
View Quick Profile
Junior Member

Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 16, Visits: 192
Hi,
I want to show length of rectangle as I design in attached snapshot by pen. How can I show length of rectangle like attached snapshot?
For creating rectangle I have used this code -
https://www.nevron.com/forum/uploads/images/1be0218a-d264-4ede-a576-d3f7.png
NGraphicsPathSeries pathSeries = new NGraphicsPathSeries();
    NGraphicsPath rectangle = new NGraphicsPath();
    rectangle.AddRectangle(xLocation, yLocation, 10, diameter);
    pathSeries.GraphicsPath = rectangle;
    _cartesianChart.Series.Add(pathSeries);
    pathSeries.DisplayOnAxis(StandardAxis.PrimaryY, true);
    pathSeries.DisplayOnAxis(StandardAxis.PrimaryX, false);
    pathSeries.DisplayOnAxis(visibleXAxis.AxisId, true);


Nevron Support
Posted 5 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:38 AM
Posts: 3,054, Visits: 4,006
Hi Shweta,

Currently there is no way to achieve this with the built-in chart functionality, but you can implement this annotation using custom painting - for an example please check out:
All Examples \ Custom Painting examples.
Those examples show how you can use code to draw custom shapes / lines on the chart as well as how to convert between model and view coordinate spaces.




Best Regards,
Nevron Support Team



shweta jain
Posted 5 Years Ago
View Quick Profile
Junior Member

Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)Junior Member (21 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 16, Visits: 192
can u please provide link where i can find Custom painting examples.

Nevron Support
Posted 4 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:38 AM
Posts: 3,054, Visits: 4,006
Hi Shweta,
Open the WinForms examples shipped with the control and navigate to:
All Examples \ Custom Painting

Let us know if you cannot locate it...

Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic