Answered by:
how to set mark on specific point of highchart

Question
-
User-1045082127 posted
hi everybody. this is highchart
this is my snipped code :
option.series.push({ gridLineColor: '#197F07', name: 'alarmed', legendIndex: index, color: '#cf2400', data: data.alarmed.data, yAxis: index, // marker: { // enabled: true, // radius: 5, // fillColor:"#ff2d00" // } });
how can I set marker on specific point of data for example index 10 of data(not all ) ?
tnx and regards
I cant do it using zone :
zones:[{ value:0, color: "green", marker:{ enabled:true } } ]
Sunday, October 4, 2020 9:35 AM
Answers
-
User-1045082127 posted
finally I wind to found the problems. that is inconsistency of our data alias(missed):
according to bellow Array(2) Need Alias name (x,y) after clone their to new array with new alias name the marker works properly. best regards
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, October 5, 2020 7:28 AM
All replies
-
User1535942433 posted
Hi aminsoraya,
As far as I think,you could foreach the data and you could mark on these specific point.Just like this:
for (var p in Data) { var point = Data[p]; if (point==10) { point.marker = {enabled: true,radius: 5,fillColor:"#ff2d00"}; } else { point.marker = {radius:5}; } }
More details,you could refer to below article:
Best regards,
Yijing Sun
Monday, October 5, 2020 3:01 AM -
User-1045082127 posted
tnx for replies but it not working fo me:
for (var p in data.alarmed.data) { var point = data.alarmed.data[p]; if (point[1]===1) { point.marker = {enabled: true,radius: 5,fillColor:"#ff2d00"}; } else { //point.marker = {radius:5}; } }; option.series.push({ gridLineColor: '#197F07', name: 'alarmed', legendIndex: index, color: '#cf2400', data: data.alarmed.data, Axis:'y' });
Monday, October 5, 2020 6:07 AM -
User-1045082127 posted
finally I wind to found the problems. that is inconsistency of our data alias(missed):
according to bellow Array(2) Need Alias name (x,y) after clone their to new array with new alias name the marker works properly. best regards
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, October 5, 2020 7:28 AM