Tayyab Rashid
Tayyab Rashid

Reputation: 432

HIghcharts Legend Symbol Getting out of graph Canvas

I am using highcharts scatter chart and i want to display one specific data point legend more wider than other data points which i have implmented but the problem is when that point comes on x-axis or y-axis line it gets out of the graph canvas .

Things I have tried

offset marginLeft

Screenshot

enter image description here

But i could not fix this issue.

Is there any alternate solution for this.

Upvotes: 0

Views: 92

Answers (1)

ejane
ejane

Reputation: 46

If you want all of the points land within the plot border, and as long as you know your likely minimal data values, you could set a min on the xAxis and/or yAxis. See example, http://jsfiddle.net/7wd8vwxh/

xAxis: {
  title: {
    enabled: true,
    text: 'x axis title'
  },
  min: 150 // equal to a value lower than the lowest x value
},
yAxis: {
  title: {
    text: 'y axis title'
  },
  min: 0 // equal to a value lower than the lowest y value
},

Upvotes: 1

Related Questions