1
我似乎無法得到amCharts尊重ChartScrollbar
dragIcon
財產。我有a plunk here表明問題。amCharts的角度指令不能改變ChartScrollbar的拖車柄
我懷疑這是GrantMStevens amChartsDirective的問題,因爲我之前的問題是它沒有正確傳遞屬性,it works in this demo。以前是由xorspark調試的,我能夠複製他的調試,但是這不會以相同的方式破壞。不幸的是,我還沒有足夠好地調試JavaScript來跟蹤這一個。
任何人有什麼想法?
'use strict';
angular.module('App')
.controller('MyChartController', ['$scope', function($scope) {
$scope.data = {};
$scope.amChartOptions = {
type: "serial",
creditsPosition: "upper-left",
categoryField: "IncidentId",
rotate: true,
theme: "light",
categoryAxis: {
parseDates: false,
gridAlpha: 0.3,
gridColor: "#d3d3d3"
},
trendLines: [],
pathToImages: "http://cdn.amcharts.com/lib/3/images/",
chartScrollbar: {
oppositeAxis: true,
autoGridCount: true,
graph: "AmGraph-1",
scrollbarHeight: 65,
dragIcon: "dragIconRoundSmall",
dragIconHeight: 65,
backgroundColor: "#000",
//color: "#000",
backgroundAlpha: .5,
selectedBackgroundColor: "#337ab7",
svgIcons: true
},
graphs: [{
fillColorsField: "lineColor",
lineColorField: "lineColor",
balloonText: "[[title]] for [[category]]: [[value]]",
fillAlphas: 1,
id: "AmGraph-1",
title: "Escalation Age",
type: "column",
valueField: "Age"
}],
guides: [],
valueAxes: [{
baseValue: 0,
id: "ValueAxis-1",
labelFrequency: 1,
dateFormats: [],
title: "Days Active",
autoGridCount: true,
gridAlpha: 0.3,
gridColor: "#d3d3d3",
}],
allLabels: [],
balloon: {},
legend: {
enabled: false
},
titles: [{
id: "Title-1",
size: 15,
text: ""
}],
data: [
{
"lineColor": "#ff0000",
"IncidentId": 93528214,
"Age": 19
},{
"lineColor": "#ff0000",
"IncidentId": 93434314,
"Age": 16
},{
"lineColor": "#ff0000",
"IncidentId": 93524544,
"Age": 12
},{
"lineColor": "#ff0000",
"IncidentId": 93525454,
"Age": 10
},{
"lineColor": "#ff0000",
"IncidentId": 96578214,
"Age": 4
},{
"lineColor": "#ff0000",
"IncidentId": 93334519,
"Age": 2
}]
}
}]);
謝謝。我感到難過和尷尬:( –
對於我自己的啓發,你是如何知道這是問題的?我也認爲這就是爲什麼我應該將特定版本放入我的回購庫,然後在發佈穩定版時將其交換爲CDN版本,是的? –
嗯,我*是AmCharts支持人員的一部分,所以我可以直接詢問團隊:)如果您需要凍結特定應用程序版本爲您自己的維護目的,但是您繼承任何不固定的錯誤或不在該版本中的功能。如果你想生活在流血的邊緣,你可以鏈接到我們的CDN。出於某種原因,格蘭特的指示仍然在他的演示和他的涼亭文件中引用了我們圖表的非常舊的版本,所以不幸的是會導致類似的問題。 :( – xorspark