Hello,
I'm experiencing an issue with data labels in an XY chart where I have multiple series configurations. My setup is:
- Each data set has 2 series:
- First series: visible column chart
- Second series: hidden line with visible bullet labels (used to display values on the column series)
The Problem: Sometimes the values in the bullet labels get truncated and display as "2..." or "6..." instead of the full value.
What I've Tried:
- Increased the width of the bullet labels
- Added
{"style": {"overflow": "visible"}}
throughout the series configuration
- Added
"text": "[overflow:visible]{value}"
in the label configuration
- Set overflow properties at multiple levels in the JSON config
I've inspected the DOM and found that working labels have <tspan style="overflow:visible">8,244</tspan>
while non-working ones just have <tspan>2…</tspan>
.
Has anyone else run into this issue and found a solution? Is there a way to force all labels to display completely without truncation?
Thanks
What Ignition version are you using?
I’ve seen this in v8.1.37-39. I can’t offer a fix but I’ll tell you my experience/findings.
This chart is from the amCharts library. There are a few hidden properties that I have tried setting without any luck. It is like during first render, the chart thinks it is much smaller than it actually is and truncates the labels. Refreshing the dataset binding or doing something to cause the chart to render again seems to correct it.
I’ve also seen the chart render correctly in designer and not in the webpage.
The hidden properties I was trying had to do with the bar’s min/max width. They may not have been exposed in the component code.
I recall looking into the code for the chart and finding a function that handles the truncation. It calculated the width of the label to display compared to the bar width and truncated if needed. Nothing extraordinary there.
You may find @bmusson’s Embr Chart module more workable. You have (mostly) total control over the chart and how it looks/behaves. There is also an Apex Chart module but I can’t comment on it.
1 Like