private void button1_Click(object sender, EventArgs e) { ControlUI.SimpleChartDataSource datas= new ControlUI.SimpleChartDataSource(); datas.items.Add(new ControlUI.SimpleChartItem { ID = 1, Label = "Data 1", Value = 100, Color = System.Drawing.Color.Green }); datas.items.Add(new ControlUI.SimpleChartItem { ID = 2, Label = "Data 2", Value = 50 }); datas.items.Add(new ControlUI.SimpleChartItem { ID = 3, Label = "Data 3", Value = 75, Color = System.Drawing.Color.Red }); datas.items.Add(new ControlUI.SimpleChartItem { ID = 4, Label = "Data 4", Value = 25 }); this.simpleChart1.setDatasource(datas); this.simpleChart1.RefreshChart(); }
public void setDatasource(SimpleChartDataSource dataSource) { this.data = dataSource; this.RedrawChart(); }
public SimpleChart() { this.data = new SimpleChartDataSource(); InitializeComponent(); }