I want to display the source of graphic data in the credits of various Highcharts charts. However the string for this source can at times be quite long and will not fit on a single line. I could manually set the y value of the credits and the spacingBottom of the chart, but since I have over 50 graphics with different sources/credits (some that will fit on a single line, some that won't), is there a way to set default options that would automatically cover all possibilities?
A simple Fiddle here that shows that extra text is cut off: http://jsfiddle.net/kFskZ/
I don't know if that's what do you want.
Use Highcharts.setOptions
.
var options = {
credits: {
text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam suscipit nulla a elit porta vitae condimentum eros vehicula. Nam rhoncus mattis turpis quis rhoncus. Fusce pulvinar faucibus odio, at ultricies diam dignissim et. Donec at nibh est, quis posuere purus.',
style: {
width: 300
},
position: {
align: 'left',
x: 10
}
}
};
Highcharts.setOptions(options);
demo
Update:
There are many possibilities.
You can change legend
position and increase your legend width
. demo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With