c# - asp.net chart control shows gap between series -
i have chart dynamically generates series. series represent people. , im using yaxis in stacked bar chart generate each day of month how many people have data. problem if person1 , person3 have data first day of month , person2 has data second day, there gap between person1 , person3.
foreach (datarow dr in dt.rows) { string name = dr.itemarray.getvalue(0).tostring(); int days = (int)dr.itemarray.getvalue(1); int month = (int)dr.itemarray.getvalue(2); if (chart1.series.findbyname(name) == null) chart1.series.add(name); chart1.series[name].points.addxy(days, month); chart1.series[name].charttype = seriescharttype.stackedbar; chart1.series[name].tooltip = name; }
solution problem here was adding y , x axis using y one. when stopped adding x 1 there no more gaps.
Comments
Post a Comment