我使用%errorlevel%
gem在我的rails应用中构建Google Charts。
但我在折线图中显示负值时遇到问题。负值在积极而不是之前。
我试图谷歌如何解决它,但没有找到任何解决方案。
代码示例:
chartkick
<%= line_chart([{name: 'name_1', data: @data_for_chart_1},
{name: 'name_2', data: @data_for_chart_2}], discrete: true,
xtitle: "Cut Expenses By ($)", ytitle: "Max. Home Price ($)",
colors: ["#2E3192", "red"], library: {title: "Cutting Expenses Makes Higher Priced Homes Affordable", curveType: "none", pointSize: 0, legend: { position: "bottom" }}, id: "chart" ) %>
和@data_for_chart_1
是整数键和值。