带日期轴的柱状图不起作用 [英] Column Chart with date axis not working
问题描述
我有一个带有X轴值的柱形图表,这是一个日期。这个图表今天早上工作,但突然中断,并显示不支持值域轴的酒吧系列。作为错误消息。有问题的网站在几周内没有更新。
我的DataTable构造代码如下所示:
<$ p $
var data = new google.visualization.DataTable({
cols:[{label:Date,type:date},{label :New Users,type:number}],
rows:[{c:new { v:1355,f:null}]}]
});
我可以通过我的代码来解决这个问题吗?
问题出在Date字段上。我已经将日期字段转换为一个字符串,现在我正在使用一个字符串。在使用格式化程序的情况下,可以在将值提供给DataTable之前格式化该值:
formatter.formatValue(date)
我猜这是一个错误;我会尝试提交错误报告。
I have a Column Chart with an x-axis value which is a date. This chart worked this morning but is suddenly broken and displaying "Bars series with value domain axis is not supported." as an error message. The website in question hasn't been updated in weeks.
My DataTable construction code looks like:
var data= new google.visualization.DataTable({
"cols":[{"label":"Date","type":"date"},{"label":"New Users","type":"number"}],
"rows":[{"c":[{"v":new Date(1325656800000),"f":null},{"v":1355,"f":null}]}]
});
What can I do to my code to fix this?
The problem is with the Date fields. I've converted the date field to a String and I'm using a String now. In case you are using formatters, you can format the value before supplying it to the DataTable:
formatter.formatValue(date)
I'm guessing this is a bug; I'll try to file a bug report.
这篇关于带日期轴的柱状图不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!