c# - Line type of series in MS Chart control -
when ms chart control has multiple series, different color assigned each series automatically , default. if select charttype fastline , add 2 series, blue , orange plots seen.
instead of colors, possible each series automatically represented different line type, dashed, dot dashed, plus sign, etc.?
first i'm pretty sure plus signs markers , not charttypes.
i know sure stars , diamonds are.
you list , save in line charttype (ex spline, line, etc) , looping while binding data
sqldataadapter adapter = new sqldataadapter(query2, connection); dataset ds = new dataset(); adapter.fill(ds); int = 0; foreach (datarow dr in ds.tables[0].rows) { series series = new series(); series.points.addxy(dr["date"], dr["shipments"]); series.charttype = yourcharttypelist[i]; i++; chart1.series.add(series); }
(here using dataset)
or afterwards
//already bound int = 0; foreach (series s in chart1.series) { s.charttype = yourcharttypelist[i]; i++; }
that way if want add series, tooltip or whatever you'll have place that.
Comments
Post a Comment