c# - label the X axis in a System.Windows.Forms.DataVisualization.Charting chart with weekdays -
the x dimension of graph composed of double values contain number of minutes. cover range of 1 week. while have no problem correctly displaying values on graph, x-axis labels week-days (the hour:minute precision not important on labels, present on graph, because monday @ 15:00 point between monday , tuesday, placed before points monday @ 16:00, example). idea how can achieve this?
ps: mentioned values in minutes obtained from: #(day of week)*24*60 + hours*60 + minutes, #(day of week) = 0 monday, 1 tuesday, ...
i have been analyzing microsoft code samples here: samples environments microsoft chart controls. behavior wish may accomplished either option below:
- using multiple y axes (screenshot) realignment of data. implies having copy of original data points. modify axis properties second series. full code available in samples. have x axis.
- using primary , secondary axes: axisx , axisx2.
- using custom labels (screenshot). code sample available @ link above.
Comments
Post a Comment