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.

http://i53.tinypic.com/2jcwknd.png

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

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -