Profile Picture

How to show length of rectangle in the chart

Posted By shweta jain Last Year
Author
Message
shweta jain
Question Posted Last Year
View Quick Profile
Forum Newbie

Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: Forum Members
Last Active: 2 Months Ago
Posts: 0, Visits: 104
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 Last Year
View Quick Profile
Supreme Being

Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 2,879, Visits: 3,045
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 Last Year
View Quick Profile
Forum Newbie

Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)Forum Newbie (5 reputation)

Group: Forum Members
Last Active: 2 Months Ago
Posts: 0, Visits: 104
can u please provide link where i can find Custom painting examples.

Nevron Support
Posted 4 Months Ago
View Quick Profile
Supreme Being

Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)Supreme Being (3,905 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 2,879, Visits: 3,045
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