New topic: 

Format X Axis in Chart Director

<http://forums.realsoftware.com/viewtopic.php?t=45755>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        shahiddarbar          Post subject: Format X Axis in Chart 
DirectorPosted: Mon Oct 29, 2012 7:03 am                         
Joined: Wed Nov 17, 2010 10:49 am
Posts: 25                Hello, 

  I want to format X Axis in ChartDirector as follows. 
   
  For every month it should display month name in three letters (example: Mon)
  When the year changes it should display Year (example: 2010) + endofline + 
Month(i.e. Jan) 
   then continue to display Month until again when year changes. 

The code so far is as below 


Dim i as integer
Dim LabelX(-1) as double
Dim LabelY(-1) as Double

Dim dt as new date 

'Add two years
For i = 0 to 24

LabelY.append (i * 10)
LabelX.append dt.Totalseconds
dt.Month = dt.Month + 1

Next i 

' so we have 25 points, 1 for each month 

  Dim C As New CDXYChartMBS (850, 525)
  
  Call C.setPlotArea(50, 50, 750, 400, &hffffff , -1, &hffffff,&hffffff,-1)
  
  Call C.xAxis.setTitle("Time", "arialbd.ttf", 12)
  Call C.yAxis.setTitle("Score", "arialbd.ttf", 12)
  
  C.yAxis.setWidth(2)
  C.xAxis.setWidth(2)
  
  Call C.addScatterLayer(LabelX, LabelY, "", C.kGlassSphere2Shape, 10, &ha2a2a2)

Thanks for your help.   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to