문제

Im using System.Web.UI.DataVisualization.Charting for creating charts.

I want to plot different timevalues against the different dates

where Time values will be in Y axis and Date Values will be in X axis.

I tried using

     chart.Series[0].XValueType = ChartValueType.Date;
     chart.Series[0].YValueType = ChartValueType.Time;

For adding im taking from

     Dictionary<DateTime,DateTime>

and

     chart.Series[0].Points.AddXY(item.Key.ToOADate(),item.Value.ToOADate());

But it is giving a 45 degree line chart but i want it like a trend Report.

도움이 되었습니까?

해결책

Actually my mistake is, I added the items to the series from the dictionary and then i gave the xvaluetype and yvaluetype

But now i fixed it by giving the xvalue type and yvaluetype before adding the item to the series.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top