• Saving a chart
  • Backup in BMP format
  • Differences between grDestinationBMP and <Chart>.SaveBMP
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
Saves a chart that was previously drawn in a file in BMP format.
Linux Caution: A specific configuration is required to use this function in Linux. For more details, see The charts.
// Saves the chart named CHART_MyChart in the "C:\Charts\Chart.BMP" file
<Result> = <Chart control>.SaveBMP(<Name of BMP file>)
<Result>: Boolean
  • True if the chart was saved,
  • False otherwise.
<Chart control>: Control name
Name of the Chart control to use (in the window, page or report editor).
<Name of BMP file>: Character string
Name and full path of BMP file to create. The file extension is mandatory. This BMP file is created during the call to <Chart>.SaveBMP. The file is overwritten and re-created if it already existed.

Saving a chart

  • To save a chart, the chart must have been drawn beforehand (<Chart>.Draw). The modifications performed since the last call to <Chart>.Draw will be ignored.
  • The default size of the image is set to 639 x 479. These dimensions are taken into account if the chart was never drawn or if it is not visible.

Backup in BMP format

  • This file can be read by a tool that recognizes the BMP format.
  • The size of the file is identical to the size of the destination (size of window size, control or file).
  • We recommend that you preview the chart before it is saved in a file.

Differences between grDestinationBMP and <Chart>.SaveBMP

  • grDestinationBMP is used to define the destination for the next drawing of the chart. When <Chart>.Draw is used, the chart will be drawn in the specified file and all the changes made since the chart was last drawn will be taken into account.
  • <Chart>.SaveBMP is used to directly save the chart in a file in BMP format. The image saved corresponds to the chart during the last call to <Chart>.Draw. The changes made to the chart since <Chart>.Draw was last called will be ignored.
Related Examples:
The Chart functions Unit examples (WINDEV): The Chart functions
[ + ] Using the main chart designer features of WINDEV:
- Create a Pie, Column or Line chart
- Define the display area of a chart
- Define the chart options (legend, percentage, ...)
- Draw a line on a chart
Component: wd270grf.dll
Minimum version required
  • Version 23
This page is also available for…
Click [Add] to post a comment