xieziyu / ngx-echarts

An angular (ver >= 2.x) directive for ECharts (ver >= 3.x)
https://xieziyu.github.io/ngx-echarts/
MIT License
1.1k stars 195 forks source link

xAxis 不能赋值 #8

Closed licongchao closed 6 years ago

licongchao commented 7 years ago

你好,X轴的data好像不能赋值,我看dataset只是对series的值做操作,但是如果要做实时的曲线的,应该怎么实现的?谢谢了

xieziyu commented 7 years ago

@licongchao

  1. X轴的data,你是指xAxis中的data部分吗?这部分ngx-echarts并没有提供像dataset一样的快捷入口,所以这部分的值,需要通过echarts标准的options配置传入。

  2. dataset是操作series里面的data属性的快捷入口,如果不需要频繁更新x轴的data,那么dataset是处理实时曲线的最佳方式。但是如果实时曲线在变更的同时,还需频繁更新x轴的data的话,可以不使用dataset,而是直接动态更新options(也就是手动更新options.xAxis属性和series中的data属性)。

edgexie commented 6 years ago

@xieziyu Hi, after my put forward the issue #35, I see this, I am sorry, I hope ngx-echart can provide the quick entry to update xAxis.data and serise at the same time. There are all for real-time chart