以下是原始图表的演示:
一切都很好
当我添加自己的数据时:
http://jsfiddle.net/pu0Lnp0s/1/
图表停止渲染。唯一的区别是我添加了自己的数据:
[[1512345600000,77.92,78.92],[1512086400000,78.17,79.17],[1512000000000,78.43,79.43],[1511913600000,79.98,80.98],[1511827200000,79.37,80.37],[1511740800000,79.5,80.5],[1511481600000,79.57,80.57],[1511395200000,79.88,80.88],[1511308800000,80.05,81.05],[1511222400000,79.58,80.58],[1511136000000,79.61,80.61],[1510876800000,79.92,80.92],`
有人可以告诉我原因吗?
答案 0 :(得分:1)
不熟悉这些脚本,但您的数据阵列是日期(和温度)列表,您从最近一天开始。我怀疑它应该从最低到最高日期获得物品。所以我还原了数组:
var tempData = [[1512345600000,77.92,78.92],[1512086400000,78.17,79.17],[1512000000000,78.43,79.43],[1511913600000,79.98,80.98],[1511827200000,79.37,80.37],[1511740800000,79.5,80.5],[1511481600000,79.57,80.57],[1511395200000,79.88,80.88],[1511308800000,80.05,81.05],[1511222400000,79.58,80.58],[1511136000000,79.61,80.61],[1510876800000,79.92,80.92],[1510790400000,79.82,80.82],[1510704000000,79.58,80.58],[1510617600000,79.82,80.82],[1510531200000,80.52,81.52],[1510272000000,79.85,80.85],[1510185600000,79.94,80.94],[1510099200000,79.27,80.27],[1510012800000,77.2,78.2],[1509926400000,76.4,77.4],[1509667200000,76.79,77.79],[1509580800000,76.41,77.41],[1509494400000,76.67,77.67],[1509408000000,76.63,77.63],[1509321600000,77.12,78.12],[1509062400000,77.24,78.24],[1508976000000,77.99,78.99],[1508889600000,77.63,78.63],[1508803200000,77.66,78.66],[1508716800000,77.69,78.69],[1508457600000,77.97,78.97],[1508371200000,77.74,78.74],[1508284800000,77.37,78.37],[1508198400000,77.25,78.25],[1508112000000,76.2,77.2],[1507852800000,75.66,76.66],[1507766400000,75.41,76.41],[1507680000000,75.35,76.35],[1507593600000,75.35,76.35],[1507507200000,75.71,76.71],[1507248000000,75.3,76.3],[1507161600000,74.32,75.32],[1507075200000,74.4,75.4],[1506988800000,74.16,75.16],[1506902400000,75.34,76.34],[1506643200000,74.25,75.25],[1506556800000,74.12,75.12],[1506470400000,73.85,74.85],[1506384000000,74.1,75.1],[1506297600000,74.81,75.81],[1506038400000,75.62,76.62],[1505952000000,75.07,76.07],[1505865600000,75.29,76.29],[1505779200000,75.28,76.28],[1505692800000,75.69,76.69],[1505433600000,75.28,76.28],[1505347200000,75.75,76.75],[1505260800000,75.55,76.55],[1505174400000,74.92,75.92],[1505088000000,73.26,74.26],[1504828800000,72.24,73.24],[1504742400000,72.98,73.98],[1504656000000,72.7,73.7],[1504569600000,73.59,74.59],[1504483200000,73.41,74.41],[1504224000000,74.48,75.48],[1504137600000,74.8,75.8],[1504051200000,74.37,75.37],[1503964800000,74.73,75.73],[1503878400000,75.68,76.68],[1503619200000,76.72,77.72],[1503532800000,76.55,77.55],[1503446400000,77.21,78.21],[1503360000000,77.66,78.66],[1503273600000,77.41,78.41],[1503014400000,78.09,79.09],[1502928000000,78.55,79.55],[1502841600000,78.84,79.84],[1502755200000,80.25,81.25],[1502668800000,80.31,81.31],[1502409600000,79.5,80.5],[1502323200000,80.05,81.05],[1502236800000,80.11,81.11],[1502150400000,79.65,80.65],[1502064000000,80.52,81.52],[1501804800000,79.72,80.72],[1501718400000,82.97,83.97],[1501632000000,83.23,84.23],[1501545600000,83.54,84.54],[1501459200000,82.73,83.73],[1501200000000,82.76,83.76],[1501113600000,84.05,85.05],[1501027200000,83.81,84.81],[1500940800000,83.28,84.28],[1500854400000,82.57,83.57],[1500595200000,82.97,83.97],[1500508800000,83.56,84.56],[1500422400000,82.81,83.81],[1500336000000,80.4,81.4],[1500249600000,81.94,82.94],[1499990400000,82.12,83.12],[1499904000000,81.56,82.56],[1499817600000,81.12,82.12],[1499731200000,81.94,82.94],[1499644800000,81.81,82.81],[1499385600000,81.13,82.13],[1499299200000,82.01,83.01],[1499212800000,82.64,83.64],[1499126400000,83,84],[1499040000000,81.44,82.44],[1498780800000,81.81,82.81],[1498694400000,83.02,84.02],[1498608000000,81.71,82.71],[1498521600000,81.08,82.08],[1498435200000,80.55,81.55],[1498176000000,80.25,81.25],[1498089600000,80.88,81.88],[1498003200000,79.8,80.8],[1497916800000,81.24,82.24],[1497830400000,81.79,82.79],[1497571200000,80.86,81.86],[1497484800000,80.7,81.7],[1497398400000,81.3,82.3],[1497312000000,80.13,81.13],[1496966400000,78.19,79.19],[1496880000000,78.05,79.05],[1496793600000,77.5,78.5],[1496707200000,77.15,78.15],[1496620800000,78.31,79.31],[1496361600000,79.38,80.38],[1496275200000,78.62,79.62],[1496188800000,78.65,79.65],[1496102400000,78.44,79.44],[1496016000000,77.89,78.89],[1495756800000,79.14,80.14],[1495670400000,80.26,81.26],[1495584000000,80,81],[1495497600000,79.94,80.94],[1495411200000,80.27,81.27],[1495152000000,79.23,80.23],[1495065600000,79.81,80.81],[1494979200000,79.97,80.97],[1494892800000,81.61,82.61]];
var myData = tempData.reverse();
似乎它很好地呈现了图表。