0
我使用Highcharts JS圖表庫和可拖動點插件作爲項目。我可以設置我的數組值並讓它們生成正常。但是,當我嘗試通過向上或向下拖動點來更改任何給定數組元素的Y值時,控制檯將該元素作爲未定義返回。任何想法爲什麼?數組值在控制檯返回undefined /圓整數組元素爲整數
代碼:
drag: function (e) {
// Returning false stops the drag and drops. Example:
$('#drag').html('Dragging <b>' + this.series.name + '</b>, <b>' + this.category + '</b> to <b>' + Highcharts.numberFormat(e.newY, 0) + '</b>');
},
drop: function() {
$('#drop').html('In <b>' + this.series.name + '</b>, <b>' + this.category + '</b> was set to <b>' + Highcharts.numberFormat(this.y, 0) + '</b>');
console.log(array.map(function(c) { return c[1]; }));
}
的另一個問題是,Y值不是整數,所以如果有人知道如何圓陣的元素可以工作
請重新創建jsFiddle問題嗎?謝謝。 – 2014-09-01 13:16:46
我會嘗試xD真的是新的js – Danazar 2014-09-01 13:22:00
@PawełFushttp://jsfiddle.net/AyUbx/1568/ – Danazar 2014-09-01 13:25:29