Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/ChartDirector/boxwhisker
Function:
Required plugins for this example: MBS ChartDirector Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /ChartDirector/boxwhisker
This example is the version from Sun, 17th Mar 2012.
Project "boxwhisker.rbp"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class PicWindow Inherits Window
EventHandler Sub Open() // Sample data for the Box-Whisker chart. Represents the minimum, 1st quartile, // medium, 3rd quartile and maximum values of some quantities dim Q0Data(-1) as double = array(40, 45, 40, 30, 20, 50, 25, 44.0) dim Q1Data(-1) as double = array(55, 60, 50, 40, 38, 60, 51, 60.0) dim Q2Data(-1) as double = array(62, 70, 60, 50, 48, 70, 62, 70.0) dim Q3Data(-1) as double = array(70, 80, 65, 60, 53, 78, 69, 76.0) dim Q4Data(-1) as double = array(80, 90, 75, 70, 60, 85, 80, 84.0) // The labels for the chart dim labels(-1) as string = array("Group A", "Group B", "Group C", "Group D", "Group E", "Group F", "Group G", "Group H") // Create a XYChart object of size 550 x 250 pixels dim c as new CDXYChartMBS(550, 250) // Set the plotarea at (50, 25) and of size 450 x 200 pixels. Enable both // horizontal and vertical grids by setting their colors to grey (&hc0c0c0) c.setPlotArea(50, 25, 450, 200).setGridColor(&hc0c0c0, &hc0c0c0) // Add a title to the chart call c.addTitle("Computer Vision Test Scores") // Set the labels on the x axis and the font to Arial Bold c.xAxis.setLabels(labels).setFontStyle("arialbd.ttf") // Set the font for the y axis labels to Arial Bold call c.yAxis.setLabelStyle("arialbd.ttf") // Add a Box Whisker layer using light blue &h9999ff as the fill color and blue // (&hcc) as the line color. Set the line width to 2 pixels c.addBoxWhiskerLayer(Q3Data, Q1Data, Q4Data, Q0Data, Q2Data, &h9999ff, &h0000cc).setLineWidth(2) // Output the chart Backdrop=c.makeChartPicture End EventHandler
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS ChartDirector Plugin.




Links
MBS Xojo Plugins