Hi Bargitta,
1. As the attachment shows(please refer to Q1), currently I use NFunctionCalculator to draw some lines. However, when it comes to the clustered bar, the default line position especially the point location is not suitable. How can I map the line position to the corresponding bar series?
2. Does nevron support the function of drawing a linear trend line of bars as the excel does? If so, how can I access this function?
3. If I want to get the X coordinate of each bar center, especially for clustered bars, how to calculate it?
1 & 2 actually are related - you can get the x coordinate using the following formula in pseudo code
clusterWidth = (1 * barPercentWidthOfCluster) / 100.0
barWidth = clusterWidth / numberOfBarsInCluster
barX = barIndex + 0.5 - clusterWidth / 2.0 + barWidth * barIndexInCluster + barWidth / 2.0
in general the idea is to find the center coordinate:
barIndex + 0.5
then move to the beginning of the cluster:
barIndex + 0.5 - clusterWidth / 2.0
then advance to the to the bar center
barX = barIndex + 0.5 - clusterWidth / 2.0 + barWidth * barIndexInCluster + barWidth / 2.0
Best Regards,
Nevron Support Team