Chart Structuring
Any [CARTESIAN_TYPE]Chart
widget represents the data along the Cartesian Axes and plotted with the Cartesian Grid. We will learn about configuring the Chart Axes in the next chapter.
Every Cartesian Chart widget provides two key properties:
chartStructureData
chartStylingData
These properties control how your Grid and Axes layouts are configured as per provided data and stylised as required.
ChartStructureData
First, let's understand the chartStructureData
property, as it plays a vital role in the Grid Layout Construction. For this example, we will be using a BarChart
in the code sample.
Let's take a look at the below example:
In the above example, we specified that our maximum values along X & Y axis are 10
. And we are to consider unit value as 1
for both. This creates a 10 x 10
Cartesian Grid in which we have plotted our bar value.
If we were to update the unit values to 2
, then we would get. 5 X 5
Grid. This how you can can use the chartStructureData
property to effectively control the structuring of your grid dimensions, hence the name.
Class Properties
Name | Behaviour | Type | Required | Default Value |
---|---|---|---|---|
xUnitValue | Constructs intervals along x-axis. |
| false | 1 |
yUnitValue | Constructs intervals along y-axis. |
| false | 10 |
maxXValue | The max value along +ve x-axis. Auto-calculated internally from series data if not specified. |
| false |
|
maxYValue | The max value along +ve y-axis. Auto-calculated internally from series data if not specified. |
| false |
|
Once the Chart Structure is defined, all that's left is styling for the Grid and Axes. We'll look at this in the next chapter.
Last updated