Format DateAsOrdinal xAxis labels in ZedGraph -
i have changed x axis dateasordinal, improve label format. handle xaxis.scaleformatevent this:
private function onxscaleformatevent(byval pane graphpane, byval axis axis, byval val double, byval index integer) string dim result string = "" if val < pricebars.count dim time date = date.fromoadate(pricebars(val).x) result = [string].format("{0:d2}{1}{2:d2}", time.hour, ":", time.minute) end if return result end function
how can make labels print every whole 30 minutes? or every 2 hours in image below? believe still need reference bar x-values, because need plot multiple days continuously, hours each day, image shows; 09:00-23:00.
i think, do:
chart.graphpane.xaxis.scale.majorstepauto = false chart.graphpane.xaxis.scale.majorunit = dateunit.minute chart.graphpane.xaxis.scale.majorstep = 30 chart.graphpane.xaxis.scale.basetic = 0
Comments
Post a Comment