Skip to content
Thomas Möller edited this page Apr 12, 2024 · 53 revisions

Class name

Chart

Purpose / Description

This class contains methods and properties related to the chart.

Sub-Classes

Methods

Properties


Detailed description

The following sections contain a detailed description of the methods and properties.

AreaFilled

Description:

With this property you can specify, if the area under a line chart or in a radar chart is filled.

Default value:

False

Sample code:

myChart.AreaFilled = True

Related to:

ChartType, Horizontal, StackedChart

AspectRatio

Description:

With this property you can control the aspect ratio of the chart.

Default value:

2

Sample code:

myChart.AspectRatio = 2

Related to:

--

BackgroundColor

Description:

With this property you can specify the background color of the chart. By default, the background is transparent.

You can specify the background color in four ways:

  • rgba-code: rgba(77,22,66,0.5)
  • rgb-code: rgb(128,255,73)
  • hex-code: #FF77A1
  • color name: green

Default value:

{empty}, which leads to transparent

Sample code:

myChart.BackgroundColor = "rgb(255,123,147)"

Related to:

--

ChartType

Description:

Here you can specify the chart type. The following values are available:

  • Line
  • Bar
  • Radar
  • Doughnut
  • Pie
  • PolarArea
  • Bubble
  • Scatter

Default value:

BarChart

Sample code:

myChart.ChartType = chChartType.Line

Related to:

AreaFilled, Horizontal, StackedChart

CreateChart

Description:

Calling this method creates the chart and displays it in the control specified via "DisplayIn" property.

Sample code:

myChart.CreateChart

Related to:

DisplayIn

DisplayIn

Description:

Here you can specify where the created chart is shown. The following values are available:

  • chEdgeBrowserControl
  • chSystemBrowser

Default value:

chWebbrowserControl

Sample code:

myChart.DisplayIn = chDisplayIn.chWebbrowserControl

Related to:

CreateChart

EdgeBrowserControl

Description:

In this property you pass a reference to the edge browser control in which the chart is to be displayed.
By setting this property the value for the property DisplayIn is set to "chEdgeBrowserControl".

Default value:

--

Sample code:

Set myChart.EdgeBrowserControl= Me.ctlEdgebrowser

Related to:

DisplayIn

Horizontal

Description:

Here you can specify if the created chart is shown horizontal (from left to right).

Horizontal charts are only available for the following chart types:

  • line
  • bar

Default value:

False

Sample code:

myChart.Horizontal = True

Related to:

ChartType, AreaFilled, StackedChart

Init

Description:

Calling this method, you can initialize the chart with some optional parameters.

Parameters

  • TheControl :: Reference to the control where the chart should be shown
  • ChartType :: Type of chart to draw
  • DataSourceType :: Type of datasource
  • DataSource :: Data source
  • DataFieldNames :: List of fieldnames for the data
  • LabelFieldName :: Name of the label field

Sample code:

myChart.Init(Me.ctlWebBrowser)

Related to:

--

SaveHtmlFileForDebugging

Description:

When set to true the html string is saved in a file for debugging.
Path: Current Project
Filename: BetterAccessChart_{WebBrowserControlName}.html

Default value:

False

Sample code:

myPivot.SaveHtmlFileForDebugging = True

Related to:

--

ShowDownloadLink

Description:

With this property you can specify, if a link is shown to download the actual state of the chart as a picture.

Default value:

False

Sample code:

myChart.ShowDownloadLink = True

Related to:

--

StackedChart

Description:

With this property you control whether the datasets are displayed as stacked.

Only available in the following chart types:

  • Line
  • Bar
  • HorizontalBar

Default value:

False

Sample code:

myChart.StackedChart = True

Related to:

ChartType, AreaFilled, Horizontal

Clone this wiki locally