Hiding labels for certain data points. #4992
PSCourtney
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've got a weight loss chart that I'm extending the data line with faked data points with the last previous weight. However I dont want the label to appear for each repeated item. As it looks like the user has then entered it multiple times when they havent.
The circled entry is one the user has put in, the crossed ones are ones I've added to the chart to make it so that the line continues.
is there a way with the DataLabels formatter to hide specific labels with a flag?
I'm trying something like this:
Formatter = "function(value, { seriesIndex, dataPointIndex, w }) { " + "var dp = w.config.series[seriesIndex].data[dataPointIndex]; " + "console.log('DataPoint:', dp); " + "if(dp && dp.isFaked) { return ''; } " + "return value.toString(); }",
Beta Was this translation helpful? Give feedback.
All reactions