Example: /ChartDirector/semicirclemeter

Online Documentation   -   Statistics   -   FAQ   -   Plugin Parts (All, Dependencies)   -   Class hierarchy

New in Version 22.2 22.3 22.4 22.5 23.0 23.1 23.2 23.3 23.4 23.5 24.0 24.1

The list of the   topics,   classes,   interfaces,   controls,   modules,   global methods by category,   global methods by name,   screenshots,   licenses   and   examples.

Platforms to show: All Mac Windows Linux Cross-Platform

/ChartDirector/semicirclemeter


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/semicirclemeter

This example is the version from Sun, 17th Mar 2012.

Project "semicirclemeter.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class PicWindow Inherits Window
EventHandler Sub Open() // The value to display on the meter const value = 27.48 // Create an AngularMeter object of size 200 x 115 pixels, with silver background // color, black border, 2 pixel 3D border border and rounded corners dim m as new CDAngularMeterMBS(200, 115, CDBaseChartMBS.silverColor, &h000000, 2) m.setRoundedFrame // Set the meter center at (100, 100), with radius 85 pixels, and span from -90 // to +90 degress (semi-circle) m.setMeter(100, 100, 85, -90, 90) // Meter scale is 0 - 100, with major tick every 20 units, minor tick every 10 // units, and micro tick every 5 units m.setScale(0, 100, 20, 10, 5) // Set 0 - 60 as green (66FF66) zone m.addZone(0, 60, 0, 85, &h66ff66) // Set 60 - 80 as yellow (FFFF33) zone m.addZone(60, 80, 0, 85, &hffff33) // Set 80 - 100 as red (FF6666) zone m.addZone(80, 100, 0, 85, &hff6666) // Add a text label centered at (100, 60) with 12 pts Arial Bold font call m.addText(100, 60, "PSI", "arialbd.ttf", 12, CDBaseChartMBS.kTextColor, CDBaseChartMBS.kCenter) // Add a text box at the top right corner of the meter showing the value // formatted to 2 decimal places, using white text on a black background, and // with 1 pixel 3D depressed border m.addText(156, 8, m.formatValue(value, "2"), "arial.ttf", 8, &hffffff).setBackground(&h000000, 0, -1) // Add a semi-transparent blue (40666699) pointer with black border at the // specified value call m.addPointer(value, &h40666699, &h000000) // Output the chart Backdrop=m.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

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


💬 Ask a question or report a problem