You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update the Charts documentation to better showcase nested tag settings (#62)
* docs(chart): New templates for nested tag settings and updated chart series with the template
* chore(docs): updated Columns article to use sequential data for the labels
* chore(chart): minor improvements on customization guidance
Co-authored-by: Marin Bratanov <[email protected]>
Copy file name to clipboardExpand all lines: _contentTemplates/chart/link-to-basics.md
+55Lines changed: 55 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -129,3 +129,58 @@ You can render the lines between the points with different styles. The supported
129
129
You can control how transparent the series fill is through the `Opacity` property. `0` means a completely transparent series, and `1` means a completely opaque (non-transparent) fill. You can use decimal values to set the desired transparency (for example, `Opacity="0.3"`).
130
130
#end
131
131
132
+
133
+
#tip-look-for-nested-tags
134
+
>tip To customize the chart, look for nested tags and heir properties - the inner tags will contain their parent tag name and add specifics to its end. For example, the `ChartSeries` tag has a `ChartSeriesLabels` tag that exposes configuration otions and more child tags.
135
+
#end
136
+
137
+
138
+
#configurable-nested-chart-settings
139
+
### Customize Chart Elements - Nested Tags Settings
140
+
141
+
When configuring nested properties and child elements in your chart, the inner tags will contain their parent tag name and add specifics to its end. In general the structure of such nested tags will be `<Chart*Category**Specifics*>` where the Category can be one of the following:
An example of this is the rotation the Labels of a [categorical]({%slug components/chart/databind%}#series-types) chart. You can use the
157
+
158
+
`ChartCategoryAxes` > `ChartCategoryAxis` > `ChartCategoryAxisLabels` > `ChartCategoryAxisLabelsRotation` tag
159
+
160
+
and set the `Angle` property to the desired value in degrees (they might be negative or positive numbers). By using similar approach you can take control over `ChartCategoryAxisLabelsMargin` (add margin for top, bottom, left and right), `ChartCategoryAxisLabelsPadding` (add padding for top, bottom, left and right) and others.
161
+
162
+
This approach is not limited only to the Labels - it can be used with all tags that are applicable for the chart type, for example the Chart Title `ChartTitle` > `ChartTitleMargin`.
163
+
164
+
#end
165
+
166
+
#configurable-nested-chart-settings-numerical
167
+
168
+
For example, for [numerical]({%slug components/chart/databind%}#series-types) charts you can rotate the Labels for `ChartXAxes` or `ChartYAxes` depending on your application design needs and layout. This can be done through the
169
+
170
+
`ChartXAxes` > `ChartXAxis` > `ChartXAxisLabelsRotation` tag
171
+
172
+
where you can set the `Angle` property to the desired value in degrees (they might be negative or positive numbers). By using similar approach you can take control over `ChartXAxisLabelsBorder` (add borders), `ChartXAxisLabelsMargin` (add margin for top, bottom, left and right) and others.
173
+
174
+
This approach is not limited only to the Labels - it can be used with to all tags that are applicable for the chart type, for example the Chart Title `ChartTitle` > `ChartTitleMargin`.
175
+
176
+
#end
177
+
178
+
#configurable-nested-chart-settings-axis-free
179
+
180
+
For example, for [axis-free]({%slug components/chart/databind%}#series-types) charts you can rotate their Labels, Title, Legend and others. Example for doing so is customizing the Chart Series Labels by using the parameters in the
181
+
182
+
`ChartSeriesItems` > `ChartSeries` > `ChartSeriesLabels` tag and its child tags.
183
+
184
+
This approach is not limited only to the Labels - it can be used with to all tags that are applicable for the chart type, for example the Chart Title `ChartTitle` > `ChartTitleMargin`.
Copy file name to clipboardExpand all lines: components/chart/overview.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ Basic chart and common settings/elements
59
59
};
60
60
61
61
public List<object> simpleData = new List<object>() { 10, 2, 7, 5 };
62
-
62
+
63
63
public string[] xAxisItems = new string[] { "Q1", "Q2", "Q3", "Q4" };
64
64
}
65
65
````
@@ -68,9 +68,10 @@ Basic chart and common settings/elements
68
68
69
69

70
70
71
-
>tip When configuring nested properties and child elements in your chart, the inner tags will contain their parent tag name and add specifics to its end. You can see an example of this with the `ChartSeries` > `ChartSeriesLabels` tags in the above example.
Copy file name to clipboardExpand all lines: components/chart/types/bubble.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ position: 0
10
10
11
11
# Bubble Chart
12
12
13
-
A **Bubble** chart shows the data as points with coordinates and size defined by their items' values. You might think of a Bubble chart as a variation of the [Scatter chart]({%slug components/chart/types/scatter%}), in which the data points are replaced with bubbles. This allows a Bubble chart to display three dimensional data — two values for the items' coordinates and one for their size.
13
+
A **Bubble** chart shows the data as points with coordinates and size defined by their items' values. You might think of a Bubble chart as a variation of the [Scatter chart]({%slug components/chart/types/scatter%}), in which the data points are replaced with bubbles. This allows a Bubble chart to display three dimensional data — two values for the items' coordinates and one for their size.
14
14
15
15
A Bubble chart is useful for visualizing different scientific relationships (e.g, economical, social, etc.). This chart type's x-axis is also numerical and does not require items.
16
16
@@ -100,7 +100,7 @@ To create a bubble chart:
100
100
101
101
### Color
102
102
103
-
The color of a series is controlled through the `Color` property that can take any valid CSS color (for example, `#abcdef`, `#f00`, or `blue`). The color control the fill color of the bubble.
103
+
The color of a series is controlled through the `Color` property that can take any valid CSS color (for example, `#abcdef`, `#f00`, or `blue`). The color control the fill color of the bubble.
104
104
105
105
The `ColorField` can change the color of individual items. To use it, pass a valid CSS color to the corresponding field in the model and the chart will use its values instead of the `Color` parameter.
106
106
@@ -156,6 +156,11 @@ The size field should, generally, have positive values as it correlates to the p
Copy file name to clipboardExpand all lines: components/chart/types/column.md
+61Lines changed: 61 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,17 @@ Column series
59
59
60
60
## Column Chart Specific Appearance Settings
61
61
62
+
### Markers
63
+
64
+
Each data item is denoted with a marker (label). You can control and customize them through the `< ChartCategoryAxisLabels />` and its children tags.
65
+
66
+
*`Visible` - hide all markers by setting this parameter to `false`.
67
+
*`Step` - renders every n-th marker, where n is the value(double number) passed to the parameter.
68
+
*`Skip` - skips the first n markers, where n is the value(double number) passed to the parameter.
69
+
*`Angle` - rotates the markers with the desired angle by n degrees, where n is the value passed to the parameter. It can take positive and negative numbers. To set this parameter use the `< ChartCategoryAxisLabelsRotation />` child tag.
70
+
71
+
To rotate the markers use the `ChartCategoryAxisLabelsRotation` child tag and set its `Angle` parameter. It can take positive and negative numbers as value.
72
+
62
73
### Color
63
74
64
75
The color of a series is controlled through the `Color` property that can take any valid CSS color (for example, `#abcdef`, `#f00`, or `blue`). The color control the fill color of the area.
@@ -67,6 +78,56 @@ The color of a series is controlled through the `Color` property that can take a
0 commit comments