本文整理匯總了TypeScript中@amcharts/amcharts3-angular.AmChartsService類的典型用法代碼示例。如果您正苦於以下問題:TypeScript AmChartsService類的具體用法?TypeScript AmChartsService怎麽用?TypeScript AmChartsService使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了AmChartsService類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: ngOnDestroy
ngOnDestroy() {
clearInterval(this.timer);
// Cleanup chartdiv2
if (this.chart2) {
this.AmCharts.destroyChart(this.chart2);
}
}
示例2: setInterval
this.timer = setInterval(() => {
// Update chartdiv1
this.options = this.makeOptions(this.makeRandomDataProvider());
// Update chartdiv2
this.AmCharts.updateChart(this.chart2, () => {
this.chart2.dataProvider = this.makeRandomDataProvider();
});
}, 3000);
示例3: ngOnDestroy
ngOnDestroy() {
this.AmCharts.destroyChart(this.chart);
this.AmCharts.destroyChart(this.chart2);
}
示例4: ngOnInit
ngOnInit() {
this.chart = this.AmCharts.makeChart("chartdiv", {
"type": "serial",
"theme": "light",
"legend": {
// "useGraphSettings": true,
"enabled": false
},
"dataProvider": [{
"year": 1930,
"italy": 1,
"germany": 5,
"uk": 3
}, {
"year": 1934,
"italy": 1,
"germany": 2,
"uk": 6
}, {
"year": 1938,
"italy": 2,
"germany": 3,
"uk": 1
}, {
"year": 1950,
"italy": 3,
"germany": 4,
"uk": 1
}, {
"year": 1954,
"italy": 5,
"germany": 1,
"uk": 2
}, {
"year": 1958,
"italy": 3,
"germany": 2,
"uk": 1
}, {
"year": 1962,
"italy": 1,
"germany": 2,
"uk": 3
}, {
"year": 1966,
"italy": 2,
"germany": 1,
"uk": 5
}, {
"year": 1970,
"italy": 3,
"germany": 5,
"uk": 2
}, {
"year": 1974,
"italy": 4,
"germany": 3,
"uk": 6
}, {
"year": 1978,
"italy": 1,
"germany": 2,
"uk": 4
}],
"valueAxes": [{
"integersOnly": true,
"maximum": 6,
"minimum": 1,
"axisAlpha": 0,
"dashLength": 5,
"gridCount": 10,
"position": "left",
"title": "Place taken"
}],
"listener":[],
"startDuration": 0.5,
"graphs": [{
"balloonText": "place taken by Italy in [[category]]: [[value]]",
"bullet": "round",
"hidden": true,
"title": "Italy",
"valueField": "italy",
"fillAlphas": 0
}, {
"balloonText": "place taken by Germany in [[category]]: [[value]]",
"bullet": "round",
"title": "Germany",
"valueField": "germany",
"fillAlphas": 0
}, {
"balloonText": "place taken by UK in [[category]]: [[value]]",
"bullet": "round",
"title": "United Kingdom",
"valueField": "uk",
"fillAlphas": 0
}],
"chartCursor": {
"cursorAlpha": 0,
"zoomable": false,
"categoryBalloonEnabled":false
//.........這裏部分代碼省略.........
示例5: ngOnInit
ngOnInit() {
this.chartData1 = new Object(this.commonChartPart());
this.chartData1.graphs.push({
"balloonText": "place taken by Italy in [[category]]: [[value]]",
"bullet": "round",
"hidden": true,
"title": "Italy",
"valueField": "italy",
"fillAlphas": 0
}, {
"balloonText": "place taken by Germany in [[category]]: [[value]]",
"bullet": "round",
"title": "Germany",
"hidden": true,
"valueField": "germany",
"fillAlphas": 0
}, {
"balloonText": "place taken by UK in [[category]]: [[value]]",
"bullet": "round",
// "type":"column",
"title": "United Kingdom",
"valueField": "uk",
"fillAlphas": 0.2
})
this.chartData1.marginTop=5;
this.chartData1.marginBottom=0;
debugger;
this.chartData1.valueAxes.push({
"integersOnly": true,
"maximum": 6,
"minimum": 1,
"axisAlpha": 0,
"fontSize": 10,
"dashLength": 5,
"gridCount": 10,
"position": "left",
})
this.chartData1.categoryAxis = {
"labelsEnabled":false,
}
this.chart = this.AmCharts.makeChart("chartdiv", this.chartData1);
this.chartData2 = new Object(this.commonChartPart());
this.chartData2.graphs.push({
"balloonText": "place taken by Italy in [[category]]: [[value]]",
"bullet": "round",
"hidden": true,
"title": "Italy",
"valueField": "italy",
"fillAlphas": 0
}, {
"balloonText": "place taken by Germany in [[category]]: [[value]]",
"bullet": "round",
"title": "Germany",
// "type": "column",
"valueField": "germany",
"fillAlphas": 0.2
}, {
"balloonText": "place taken by UK in [[category]]: [[value]]",
"bullet": "round",
"title": "United Kingdom",
"hidden": true,
"valueField": "uk",
"fillAlphas": 0
})
this.chartData2.marginTop = -1
this.chartData2.marginBottom = 4
this.chartData2.valueAxes.push({
"integersOnly": true,
"maximum": 6,
"minimum": 1,
"reversed": true,
"axisAlpha": 0,
"fontSize": 10,
"dashLength": 5,
"gridCount": 10,
"position": "left"
})
this.chartData2.categoryAxis = {
"labelsEnabled":false,
"position":"top"
}
this.chart2 = this.AmCharts.makeChart("chartdiv2", this.chartData2);
}