Is it possible to display the values always on the chart.
- Arun Surendran asked 2 years ago
- You must login to post comments
Hi Arun
Similar to your other question, the TextAnnotation type will let you place text labels on a JS chart.
There is no automatic way to say show/hide text-labels on data-points but perhaps we can add this to our backlog as a feature request.
Please note the Anchor point properties on TextAnnotation. Some code like this will probably work for you:
// Set the X,Y coordinate of your data-point
const xValue = 1.23;
const yValue = 3.45;
// Add the annotation to the chart per data-point
sciChartSurface.annotations.add(
new TextAnnotation({
text: `${yValue}`,
horizontalAnchorPoint: EHorizontalAnchorPoint.Left, // Anchor left/center
verticalAnchorPoint: EVerticalAnchorPoint.Center,
x1: xValue,
y1: yValue
}),
Best regards,
Andrew
- Andrew Burnett-Thompson answered 2 years ago
-
Hi Andrew Burnett-Thompson. We can add the text to the chart. But my application has the zoom and pan options. So its difficult to find the x and y points from the chart and add all the data points. Its good if we can show/hide the value using any properties.
- You must login to post comments
Please login first to submit.