c# - Line Chart with date and time on X axis -
i working line chart using zedgraph , c# in visual studio 2010. values are coming serial port. date , time entering x axis, each interval number of seconds change , seems weak , lacking harmony. how solve this?
maybe try using:
mypane.xaxis.type = axistype.date; mypane.xaxis.scale.format = "hh:mm"; mypane.xaxis.scale.majorstepauto = false; mypane.xaxis.scale.minorstepauto = false; mypane.xaxis.scale.majorunit = dateunit.minute; mypane.xaxis.scale.minorunit = dateunit.minute; mypane.xaxis.scale.minorstep = minor; mypane.xaxis.scale.majorstep = major; mypane.xaxis.scale.min = min; mypane.xaxis.scale.max = max; mypane.xaxis.scale.maxauto = false; mypane.xaxis.scale.minauto = false; mypane.yaxis.scale.min = min_rr; mypane.yaxis.scale.max = max_rr;
for minorstep
, majorstep
must use value 3, 5, 30 etc. max
, min
use eg:
xdate min = new xdate(1999, 1, 1, 0, 0, 0, 0); xdate max = new xdate(1999, 1, 1, 0, 30, 0, 0);
in changing axis type in zedgraph have example dateasordinal x axis.
i hope helps. cheers.
Comments
Post a Comment