Skip to content

Instantly share code, notes, and snippets.

@Willy-Kimura
Created November 6, 2017 11:38
Show Gist options
  • Save Willy-Kimura/818efeb7b094b25060d88e7dcd68f984 to your computer and use it in GitHub Desktop.
Save Willy-Kimura/818efeb7b094b25060d88e7dcd68f984 to your computer and use it in GitHub Desktop.
Method for generating the Dataviz spline chart - with three splines.
Sub GenerateSpline()
' Create a new canvas for rendering our chart.
Dim canvas1 As New Canvas
' Create the first spline chart datapoints-set.
Dim datapoint_1 As New DataPoint(BunifuDataViz._type.Bunifu_spline)
' Add all the datapoints for the first spline chart.
datapoint_1.addLabely("", "27")
datapoint_1.addLabely("", "35")
datapoint_1.addLabely("", "20")
datapoint_1.addLabely("", "35")
datapoint_1.addLabely("", "20")
datapoint_1.addLabely("", "60")
datapoint_1.addLabely("", "50")
datapoint_1.addLabely("", "57")
datapoint_1.addLabely("", "40")
datapoint_1.addLabely("", "45")
' Now add the datapoints-set to the canvas created.
canvas1.addData(datapoint_1)
' Create the second spline chart datapoints-set.
Dim datapoint_2 As New DataPoint(BunifuDataViz._type.Bunifu_spline)
' Add all the datapoints for the second spline chart.
datapoint_2.addLabely("", "30")
datapoint_2.addLabely("", "40")
datapoint_2.addLabely("", "60")
datapoint_2.addLabely("", "20")
datapoint_2.addLabely("", "80")
datapoint_2.addLabely("", "20")
datapoint_2.addLabely("", "20")
datapoint_2.addLabely("", "50")
datapoint_2.addLabely("", "60")
datapoint_2.addLabely("", "50")
' Add the datapoints-set to our canvas.
canvas1.addData(datapoint_2)
' Create the third spline chart datapoints-set.
Dim datapoint_3 As New DataPoint(BunifuDataViz._type.Bunifu_spline)
' Add all the datapoints for the third spline chart.
datapoint_3.addLabely("", "80")
datapoint_3.addLabely("", "35")
datapoint_3.addLabely("", "20")
datapoint_3.addLabely("", "25")
datapoint_3.addLabely("", "20")
datapoint_3.addLabely("", "40")
datapoint_3.addLabely("", "20")
datapoint_3.addLabely("", "25")
datapoint_3.addLabely("", "40")
datapoint_3.addLabely("", "50")
' Add the datapoints-set to our canvas.
canvas1.addData(datapoint_3)
' Finally include the canvas created to a Dataviz component for rendering.
BunifuDataViz1.Render(canvas1)
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment