Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有谁知道 Chartist.js 是否可以确保水平条形图占据图表容器的整个宽度?
如果您查看屏幕截图,您会发现灰色条没有占据整个宽度,根据示例我会认为该系列中的最高值数据点将被缩放以填充到图表的末尾(并且轴相应地缩放)。
见截图。
A little late but I spent the afternoon trying to achieve the same thing with some success.
In short, I created a simple plugin that, on creation, dynamically adjusts the bar width based on the stepLength property.
stepLength
https://jsfiddle.net/traviss0/gg1oj35x/