CsfWebChart » History » Version 1
Wil van Antwerpen, 01/07/2023 11:53 AM
| 1 | 1 | Wil van Antwerpen | # CsfWebChart |
|---|---|---|---|
| 2 | |||
| 3 | ## Line Chart Demo |
||
| 4 | |||
| 5 |  |
||
| 6 | |||
| 7 | The DataFlex code for the above looks like |
||
| 8 | |||
| 9 | ~~~ text |
||
| 10 | |||
| 11 | Object oFirstSeries is a csfWebChartSeries |
||
| 12 | Object oFirstMarkers is a csfWebChartMarkerSettings |
||
| 13 | Set pbVisible to True |
||
| 14 | Object oFirstDataLabel is a csfWebChartDataLabelSettings |
||
| 15 | Set pbVisible to True |
||
| 16 | Set psPosition to "Top" |
||
| 17 | Set psAlignment to "Near" |
||
| 18 | End_Object |
||
| 19 | End_Object |
||
| 20 | Procedure OnAddChartData |
||
| 21 | Send AddPoint 1 2 |
||
| 22 | Send AddPoint 2 3.6 |
||
| 23 | Send AddPoint 3 7 |
||
| 24 | Send AddPoint 4 6 |
||
| 25 | End_Procedure |
||
| 26 | End_Object |
||
| 27 | Object oSecondSeries is a csfWebChartSeries |
||
| 28 | Object oSecondMarkers is a csfWebChartMarkerSettings |
||
| 29 | Set pbVisible to True |
||
| 30 | Set psShape to "Diamond" |
||
| 31 | Object oSecondDataLabel is a csfWebChartDataLabelSettings |
||
| 32 | Set pbVisible to True |
||
| 33 | Set psPosition to "Bottom" |
||
| 34 | Set psAlignment to "Far" |
||
| 35 | End_Object |
||
| 36 | End_Object |
||
| 37 | Procedure OnAddChartData |
||
| 38 | Send AddPoint 1 1 |
||
| 39 | Send AddPoint 2 3 |
||
| 40 | Send AddPoint 3 5 |
||
| 41 | Send AddPoint 4 8 |
||
| 42 | End_Procedure |
||
| 43 | End_Object |
||
| 44 | End_Object |
||
| 45 | |||
| 46 | ~~~ |
||
| 47 | |||
| 48 | The Series object has your data. |
||
| 49 | There are markers (the diamond shapes and the dots) to indicate your data point. |
||
| 50 | There's also a DataLabel to display the actual value of your data point. |
||
| 51 | |||
| 52 | 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. |
||
| 53 | DataLabel as well as Marker objects are both optional. |
||
| 54 | |||
| 55 | This pretty much matches the JSON object definitions as is documented over at SyncFusion. |
||
| 56 | |||
| 57 | |||
| 58 | |||
| 59 | |||
| 60 | ## Bar Chart Demo |
||
| 61 | |||
| 62 |  |
||
| 63 | |||
| 64 | The DataFlex code looks like: |
||
| 65 | |||
| 66 | ~~~ text |
||
| 67 | |||
| 68 | ~~~ |