0

I am using highcharts library to draw chart and I need to display Weekdays as labels on x-axis and also to auto reset it like from Monday to M if all weekdays can't fit on screen.

It should be dynamic, which means no flickering should appear when changing label text on x-axis.

Any suggestions?

Thanks in advance.

4

1 回答 1

0

没有直接的选择,而是简单的解决方法:

  1. 禁用 Highcharts 的重排,使用window.resize浏览器事件
  2. 在那种情况下,添加条件以决定显示刚刚缩短的全名,并将其设置为图表 -chart.xAxis[0].dateTimeLabelFormats应该没问题
  3. 设置新格式后,使用chart.setSize(w, h)
于 2013-09-18T08:34:10.273 回答