Reputation: 137
highchart type : sanky
here looking for a solution to remove the blank space for hidden node of snaky chart. as per the below screen shot with step0 chart is peroper
but after hiding the first node, there is blank space on left side. how can remove the blank space . i have tried by adding negative left margin but this is not working for all screen size.
Is it possible to remove this extra spaces?
hiding node using below code:
nodes[0].graphic.hide();
nodes[0].dataLabel.hide();
nodes[0].visible = false;
nodes[0].linksFrom[0].graphic.hide();
solution should not remove the unused representation
Upvotes: 2
Views: 36
Reputation: 39069
You can remove the point and hide the remaining node graphic. For example:
const series = chart.series[0];
series.points[0].remove(true, false);
series.nodes[0].graphic.hide();
Live demo: https://jsfiddle.net/BlackLabel/n9jspzt1/
API Reference: https://api.highcharts.com/class-reference/Highcharts.Point#remove
Upvotes: 1