public void replace(ChartControl chart, IChartDataTable _table) { release(); table = _table; listener = new DataUpdateListener(chart.onUpdateCalled); table.onUpdate += listener; }
public ChartData(ChartControl chart, IChartDataTable _table, Color _color, ChartStyle _style) { Debug.Assert(_table != null); table = _table; color = _color; style = _style; listener = new DataUpdateListener(chart.onUpdateCalled); table.onUpdate += listener; }
// for all data except for stock price. public bool replaceTable(int index, IChartDataTable table) { ChartData tmp = (ChartData)series[index]; if (tmp.style == ChartStyle.STOCKCANDLE) { return(false); } tmp.replace(this, table); return(true); }
public void removeDataSource(IChartDataTable table) { IEnumerator e = series.GetEnumerator(); while (e.MoveNext()) { ChartData tmp = (ChartData)e.Current; if (table == tmp.table) { tmp.release(); series.Remove(tmp); return; } } }
public void addDataSource(IChartDataTable table, Color color, ChartStyle style) { Debug.Assert(style != ChartStyle.STOCKCANDLE); series.Add(new ChartData(this, table, color, style)); }