Top left labels with X-axis
I am setting up a chart where the legend is below the line graph. For some reason, the legend seems to overlap with the x-axis above it. My settings for the legend are as follows:
legend: {
layout: 'horizontal',
align: 'center',
itemWidth: LegendWidth,
verticalAlign: 'bottom',
floating: true,
margin: 25,
borderWidth: 3,
useHTML:true,
}
Where is LegendWidth
set dynamically. I've already added a value for the field, but it still overlaps.
+3
Ellesa
source
to share
1 answer
You must set legend.y to some positive number in order to move it further.
legend: {
layout: 'horizontal',
align: 'center',
itemWidth: LegendWidth,
verticalAlign: 'bottom',
floating: true,
margin: 25,
borderWidth: 3,
useHTML:true,
y : 25 /* pushes the legend 25 points down */
}
Here is the doc and here is an example
+5
qtgye
source
to share