Page 1 of 1

[BarSeries - Histogram Example ] How to get right position of each bar on Histogram Chart

Posted: Fri Dec 01, 2023 4:42 am
by magic
Hello
I have a Question about the right position of Histogram
I modify the example of Histogram.

[GOAL]
My goal is shown the image ( attachment - intention.jpg )
- the blue box is shown the histogram value
- the Blue middle point is same with the each barseries' middle point

[Try]
[1] I add the Button to get the screen postion of x index
[2] To get X-axies value in chart - RectangleXY[] rect = _chart.ViewXY.BarSeries[0].GetBarRectangles();
[3] Convert x-axies value to screen point - _chart.ViewXY.XAxes[0].CoordToValue(rect[count].X, out coord_x_screen_axies, true);
[4] show Result
I think the calculated the result of step 2 is not same with the middle of each bar-series

[Question]
Can you advise me to get the answer about my question ?

Re: [BarSeries - Histogram Example ] How to get right position of each bar on Histogram Chart

Posted: Fri Dec 01, 2023 12:19 pm
by ArctionKestutis
At least some help should be in ExampleBusinessDashboard from Demo. Lower-left chart has calculation to place annotation underneath of bars.
If that does not help to resolve all the questions, please send email to Support at Lightningchart.com and introduce yourself.