2
私はangular2アプリでZingChartを使用しています。 折れ線グラフのスケールxも更新しようとしています。 が、そのためのAPIを見つけることができませんでした:ここZingChartラインの更新スケールxをAngular2に設定
export class App {
charts : Chart[];
@ViewChild(ZingChart)
chart: ZingChart;
constructor() {
this.name = 'Angular2'
this.charts = [{
id : 'chart-1',
data : {
type : 'line',
series : [{
values :[2,3,4,5,3,3,2]
}],
},
height : 400,
width : 600
}]
}
update(){
this.charts[0].data.series[0].values = [1,2,3,4,5,6];
//this.charts[0].data.x.value=[1,2,3,4,5,6]; ???
this.chart.update();
}
}
だから、あなたが探しているものをスケール-X values
またはlabels
あるplunkr
あるhere.
オプションです注意する必要がありますか?数字の代わりにテキストを表示しますか?軸のラベルを変更しますか? – nardecky
@nardecky最後の12時間は持ちたいです。今度は3スケールxが[3,4,5,6,7,8,9,10,11,12,13,14]でなければならず、4になるときは4から始めるべきです[4,5 、6,7,8,9,10,11,12,13,14,15] – Noa