Last active
November 7, 2017 06:14
-
-
Save Willy-Kimura/f7de40aabb9f7d1b1cba67ae0a0feeb3 to your computer and use it in GitHub Desktop.
Method for generating the Dataviz spline chart - with three splines.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void GenerateSpline() | |
{ | |
// Create a new canvas for rendering our chart. | |
Canvas canvas1 = new Canvas(); | |
// Create the first spline chart datapoints-set. | |
DataPoint datapoint_1 = 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. | |
DataPoint datapoint_2 = 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. | |
DataPoint datapoint_3 = 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); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment