CsfWebChart » History » Version 3
Wil van Antwerpen, 01/07/2023 12:08 PM
1 | 1 | Wil van Antwerpen | # CsfWebChart |
---|---|---|---|
2 | 1 | Wil van Antwerpen | |
3 | 1 | Wil van Antwerpen | ## Line Chart Demo |
4 | 1 | Wil van Antwerpen | |
5 | 1 | Wil van Antwerpen | ![](https://support.dataaccess.com/Forums/attachment.php?attachmentid=15862&d=1672532300) |
6 | 1 | Wil van Antwerpen | |
7 | 1 | Wil van Antwerpen | The DataFlex code for the above looks like |
8 | 1 | Wil van Antwerpen | |
9 | 1 | Wil van Antwerpen | ~~~ text |
10 | 1 | Wil van Antwerpen | |
11 | 2 | Wil van Antwerpen | Object oWebChart is a csfWebChart |
12 | 2 | Wil van Antwerpen | Set piHeight to 400 |
13 | 2 | Wil van Antwerpen | Set piColumnSpan to 12 |
14 | 2 | Wil van Antwerpen | Set psTitle to "demo line chart" |
15 | 2 | Wil van Antwerpen | Set pbTooltip to True |
16 | 2 | Wil van Antwerpen | Object oXAxis is a csfWebChartAxis |
17 | 2 | Wil van Antwerpen | Set peAxisType to chartAxisX |
18 | 2 | Wil van Antwerpen | Set psTitle to "X Axis" |
19 | 2 | Wil van Antwerpen | End_Object |
20 | 2 | Wil van Antwerpen | Object oYAxis is a csfWebChartAxis |
21 | 2 | Wil van Antwerpen | Set peAxisType to chartAxisY |
22 | 2 | Wil van Antwerpen | Set psTitle to "Y Axis" |
23 | 2 | Wil van Antwerpen | End_Object |
24 | 1 | Wil van Antwerpen | Object oFirstSeries is a csfWebChartSeries |
25 | 2 | Wil van Antwerpen | Object oFirstMarkers is a csfWebChartMarker |
26 | 1 | Wil van Antwerpen | Set pbVisible to True |
27 | 2 | Wil van Antwerpen | Object oFirstDataLabel is a csfWebChartDataLabel |
28 | 1 | Wil van Antwerpen | Set pbVisible to True |
29 | 1 | Wil van Antwerpen | Set psPosition to "Top" |
30 | 1 | Wil van Antwerpen | Set psAlignment to "Near" |
31 | 1 | Wil van Antwerpen | End_Object |
32 | 1 | Wil van Antwerpen | End_Object |
33 | 1 | Wil van Antwerpen | Procedure OnAddChartData |
34 | 1 | Wil van Antwerpen | Send AddPoint 1 2 |
35 | 1 | Wil van Antwerpen | Send AddPoint 2 3.6 |
36 | 1 | Wil van Antwerpen | Send AddPoint 3 7 |
37 | 1 | Wil van Antwerpen | Send AddPoint 4 6 |
38 | 1 | Wil van Antwerpen | End_Procedure |
39 | 1 | Wil van Antwerpen | End_Object |
40 | 1 | Wil van Antwerpen | Object oSecondSeries is a csfWebChartSeries |
41 | 2 | Wil van Antwerpen | Object oSecondMarkers is a csfWebChartMarker |
42 | 1 | Wil van Antwerpen | Set pbVisible to True |
43 | 1 | Wil van Antwerpen | Set psShape to "Diamond" |
44 | 2 | Wil van Antwerpen | Object oSecondDataLabel is a csfWebChartDataLabel |
45 | 1 | Wil van Antwerpen | Set pbVisible to True |
46 | 1 | Wil van Antwerpen | Set psPosition to "Bottom" |
47 | 1 | Wil van Antwerpen | Set psAlignment to "Far" |
48 | 1 | Wil van Antwerpen | End_Object |
49 | 1 | Wil van Antwerpen | End_Object |
50 | 1 | Wil van Antwerpen | Procedure OnAddChartData |
51 | 1 | Wil van Antwerpen | Send AddPoint 1 1 |
52 | 1 | Wil van Antwerpen | Send AddPoint 2 3 |
53 | 1 | Wil van Antwerpen | Send AddPoint 3 5 |
54 | 1 | Wil van Antwerpen | Send AddPoint 4 8 |
55 | 1 | Wil van Antwerpen | End_Procedure |
56 | 1 | Wil van Antwerpen | End_Object |
57 | 1 | Wil van Antwerpen | End_Object |
58 | 1 | Wil van Antwerpen | |
59 | 2 | Wil van Antwerpen | |
60 | 1 | Wil van Antwerpen | ~~~ |
61 | 1 | Wil van Antwerpen | |
62 | 1 | Wil van Antwerpen | The Series object has your data. |
63 | 1 | Wil van Antwerpen | There are markers (the diamond shapes and the dots) to indicate your data point. |
64 | 1 | Wil van Antwerpen | There's also a DataLabel to display the actual value of your data point. |
65 | 1 | Wil van Antwerpen | |
66 | 1 | Wil van Antwerpen | You put the marker object in your series object and customize that… then if you want to do something specific with the dataLabel you add a datalabel object in that and tweak the settings for it. |
67 | 1 | Wil van Antwerpen | DataLabel as well as Marker objects are both optional. |
68 | 1 | Wil van Antwerpen | |
69 | 1 | Wil van Antwerpen | This pretty much matches the JSON object definitions as is documented over at SyncFusion. |
70 | 1 | Wil van Antwerpen | |
71 | 1 | Wil van Antwerpen | |
72 | 1 | Wil van Antwerpen | |
73 | 1 | Wil van Antwerpen | |
74 | 1 | Wil van Antwerpen | ## Bar Chart Demo |
75 | 1 | Wil van Antwerpen | |
76 | 1 | Wil van Antwerpen | ![](https://support.dataaccess.com/Forums/attachment.php?attachmentid=15863&d=1672532319) |
77 | 1 | Wil van Antwerpen | |
78 | 1 | Wil van Antwerpen | The DataFlex code looks like: |
79 | 1 | Wil van Antwerpen | |
80 | 1 | Wil van Antwerpen | ~~~ text |
81 | 1 | Wil van Antwerpen | |
82 | 2 | Wil van Antwerpen | Object oWebBarChart is a csfWebChart |
83 | 2 | Wil van Antwerpen | Set piHeight to 400 |
84 | 2 | Wil van Antwerpen | Set piColumnSpan to 12 |
85 | 2 | Wil van Antwerpen | Set psTitle to "demo Bar chart" |
86 | 2 | Wil van Antwerpen | Set pbTooltip to True |
87 | 2 | Wil van Antwerpen | Object oXAxis is a csfWebChartAxis |
88 | 2 | Wil van Antwerpen | Set peAxisType to chartAxisX |
89 | 2 | Wil van Antwerpen | Set psTitle to "Food" |
90 | 2 | Wil van Antwerpen | Set psValueType to "Category" |
91 | 2 | Wil van Antwerpen | End_Object |
92 | 2 | Wil van Antwerpen | Object oYAxis is a csfWebChartAxis |
93 | 2 | Wil van Antwerpen | Set peAxisType to chartAxisY |
94 | 2 | Wil van Antwerpen | Set psTitle to "Sales" |
95 | 2 | Wil van Antwerpen | Set psLabelFormat to "{value}B" |
96 | 2 | Wil van Antwerpen | End_Object |
97 | 2 | Wil van Antwerpen | Object oBarArea is a csfWebChartArea |
98 | 2 | Wil van Antwerpen | Set psBackground to "cornSilk" |
99 | 2 | Wil van Antwerpen | //Set psBorderColor to "green" |
100 | 2 | Wil van Antwerpen | //Set piBorderWidth to 2 |
101 | 2 | Wil van Antwerpen | End_Object |
102 | 2 | Wil van Antwerpen | Object oFirstSeries is a csfWebChartSeries |
103 | 2 | Wil van Antwerpen | //Set psType to "Bar" |
104 | 2 | Wil van Antwerpen | Set psType to "Column" |
105 | 2 | Wil van Antwerpen | Set psName to "Imports" |
106 | 2 | Wil van Antwerpen | Object oFirstMarkers is a csfWebChartMarker |
107 | 2 | Wil van Antwerpen | Object oFirstDataLabel is a csfWebChartDataLabel |
108 | 2 | Wil van Antwerpen | Set pbVisible to True |
109 | 2 | Wil van Antwerpen | Set psPosition to "Top" |
110 | 2 | Wil van Antwerpen | End_Object |
111 | 2 | Wil van Antwerpen | End_Object |
112 | 2 | Wil van Antwerpen | Procedure OnAddChartData |
113 | 2 | Wil van Antwerpen | Send AddPoint "egg" 23 |
114 | 2 | Wil van Antwerpen | Send AddPoint "chips" 43 |
115 | 2 | Wil van Antwerpen | Send AddPoint "fish" 34 |
116 | 2 | Wil van Antwerpen | Send AddPoint "tea" 16 |
117 | 2 | Wil van Antwerpen | End_Procedure |
118 | 2 | Wil van Antwerpen | End_Object |
119 | 2 | Wil van Antwerpen | Object oSecondSeries is a csfWebChartSeries |
120 | 2 | Wil van Antwerpen | //Set psType to "Bar" |
121 | 2 | Wil van Antwerpen | Set psType to "Column" |
122 | 2 | Wil van Antwerpen | Set psName to "Exports" |
123 | 2 | Wil van Antwerpen | Object oSecondMarkers is a csfWebChartMarker |
124 | 2 | Wil van Antwerpen | Object oSecondDataLabel is a csfWebChartDataLabel |
125 | 2 | Wil van Antwerpen | Set pbVisible to True |
126 | 2 | Wil van Antwerpen | Set psPosition to "Top" |
127 | 2 | Wil van Antwerpen | Set psFill to "White" |
128 | 2 | Wil van Antwerpen | End_Object |
129 | 2 | Wil van Antwerpen | End_Object |
130 | 2 | Wil van Antwerpen | Procedure OnAddChartData |
131 | 2 | Wil van Antwerpen | Send AddPoint "egg" 12 |
132 | 2 | Wil van Antwerpen | Send AddPoint "fish" 33 |
133 | 2 | Wil van Antwerpen | Send AddPoint "chips" 44 |
134 | 2 | Wil van Antwerpen | Send AddPoint "tea" 56 |
135 | 2 | Wil van Antwerpen | End_Procedure |
136 | 2 | Wil van Antwerpen | End_Object |
137 | 2 | Wil van Antwerpen | End_Object |
138 | 2 | Wil van Antwerpen | |
139 | 2 | Wil van Antwerpen | |
140 | 1 | Wil van Antwerpen | ~~~ |
141 | 2 | Wil van Antwerpen | |
142 | 2 | Wil van Antwerpen | If you set psType to "Bar' then you have a horizontal bar chart. |
143 | 2 | Wil van Antwerpen | If you set psType to "Column" you'll get the vertical bar chart like in the picture above. |
144 | 3 | Wil van Antwerpen | |
145 | 3 | Wil van Antwerpen | |
146 | 3 | Wil van Antwerpen | ## Direct SyncFusion Links |
147 | 3 | Wil van Antwerpen | |
148 | 3 | Wil van Antwerpen | Documentation for the API is here: |
149 | 3 | Wil van Antwerpen | |
150 | 3 | Wil van Antwerpen | * https://ej2.syncfusion.com/documentation/api/chart/ |
151 | 3 | Wil van Antwerpen | |
152 | 3 | Wil van Antwerpen | Tips & tricks here: |
153 | 3 | Wil van Antwerpen | |
154 | 3 | Wil van Antwerpen | * https://ej2.syncfusion.com/javascript/documentation/chart/es5-getting-started/ |
155 | 3 | Wil van Antwerpen | |
156 | 3 | Wil van Antwerpen | SyncFusion Chart control demo: |
157 | 3 | Wil van Antwerpen | |
158 | 3 | Wil van Antwerpen | * https://ej2.syncfusion.com/javascript/demos/#/material/chart/line.html |