Use cWebView.pkg Use cWebPanel.pkg Use cWebForm.pkg Use csfWebChart.pkg Use cWebButton.pkg Object oBarChartDemo is a cWebView //Set piWidth to 700 Set psCaption to "Bar Chart Demo" // Your DDO structure will go here Object oWebMainPanel is a cWebPanel Set piColumnCount to 12 Set pbFillHeight to True Object oWebBarChart is a csfWebChart Set piHeight to 400 Set piColumnSpan to 12 Set psTitle to "demo Bar chart" Set pbTooltip to True // Set pbEnableCanvas to True Object oXAxis is a csfWebChartAxis Set peAxisType to chartAxisX Set psTitle to "Food" Set psValueType to "Category" End_Object Object oYAxis is a csfWebChartAxis Set peAxisType to chartAxisY Set psTitle to "Sales" Set psLabelFormat to "{value}B" End_Object Object oBarArea is a csfWebChartArea Set psBackground to "cornSilk" //Set psBorderColor to "green" //Set piBorderWidth to 2 End_Object Object oFirstSeries is a csfWebChartSeries //Set psType to "Bar" Set psType to "Column" Set psName to "Imports" Object oFirstMarkers is a csfWebChartMarker Object oFirstDataLabel is a csfWebChartDataLabel Set pbVisible to True Set psPosition to "Top" End_Object End_Object Procedure OnAddChartData Send AddPoint "egg" 23 Send AddPoint "chips" 43 Send AddPoint "fish" 34 Send AddPoint "tea" 16 End_Procedure End_Object Object oSecondSeries is a csfWebChartSeries //Set psType to "Bar" Set psType to "Column" Set psName to "Exports" Object oSecondMarkers is a csfWebChartMarker Object oSecondDataLabel is a csfWebChartDataLabel Set pbVisible to True Set psPosition to "Top" Set psFill to "White" End_Object End_Object Procedure OnAddChartData Send AddPoint "egg" 12 Send AddPoint "fish" 33 Send AddPoint "chips" 44 Send AddPoint "tea" 56 End_Procedure End_Object End_Object Object oExportButton is a cWebButton Set piColumnSpan to 2 Set psCaption to "Export" Procedure OnClick Integer eFileType String sFileName Move cwcet_PNG to eFileType Move "BarChart-test" to sFileName Send ExportChart of oWebBarChart eFileType sFileName End_Procedure End_Object End_Object End_Object