I have some bar charts that have really long labels and they affect the size of the charts.
Example: http://jsfiddle.net/norbiu/aqa8w19d/4/
I'm trying to truncate the labels that show up under the chart while keeping the label that shows up in the tooltips when hovering over a bar. The problem is that the tooltips and the canvas labels both get their values from the labels
array in the data structure. Truncating the value will show the shortened version in both locations.
sales: ko.observable({
labels: ['A really really long label', 'Another long labe', 'A third label that is long', 'Q4', 'Q5', 'Q6'],
datasets: [{
label: 'Helados',
fillColor: '#152491',
data: [70, 32, 6, 23, 63, 43]
}]
}),
The documentation has nothing on this. Any ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…