Example: /ChartDirector/chart like watch

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/chart like watch


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/chart like watch

This example is the version from Wed, 19th Mar 2019.

Project "chart like watch.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class MainWindow Inherits Window
EventHandler Sub Open() ' The data for the pie chart dim angles() as double ' The sum must be 360 angles.Append 270 angles.Append 90 // our colors dim colors() as integer colors.Append &HA00060 colors.Append &H3f0025 const midRadius = 80 const halfRingWidth = 20 dim chartWidth as integer = (midRadius + halfRingWidth + 10) * 2 dim chartHeight as integer = chartWidth dim cX as integer = chartWidth / 2 dim cY as integer = chartHeight / 2 // start with a pie chart dim c as new CDPieChartMBS(chartWidth, chartHeight, &H004060) Call c.setDonutSize(cX, cY, midRadius + halfRingWidth, midRadius - halfRingWidth) ' Set the pie data and the pie labels Call c.setData(angles) Call c.setLabelFormat(" ") Call c.setColors(c.kDataColor, colors) // generate chart dim d as CDDrawAreaMBS = c.makeChart() // and draw some circles Call d.circle(cX, cY - midRadius, halfRingWidth, halfRingWidth, colors(0), colors(0)) dim endX as double = cX + midRadius * Sin(angles(0) * 3.1416 / 180) dim endY as double = cY - midRadius * Cos(angles(0) * 3.1416 / 180) Call d.circle(endX, endY, halfRingWidth, halfRingWidth, colors(0), colors(0)) Call d.circle(endX, endY, halfRingWidth - 5, halfRingWidth - 5, &HEEEEEE, &HEEEEEE) Call c.addText(endX, endY, "3", "arialbd.ttf", 20, colors(0), c.kCenter) Call d.circle(cX, cY, 40, 40, &HEEEEEE, &HEEEEEE) Call c.addText(cX, cY, "3", "arialbd.ttf", 40, colors(0), c.kCenter) 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

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


💬 Ask a question or report a problem