Skip to content

Commit 82e0aa6

Browse files
Add release notes for chart 4.0.0
1 parent dc22c87 commit 82e0aa6

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

releases/chart.md

+39
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
# Releases
22

3+
## v4.0.0 (2019, March, 13)
4+
5+
### Breaking changes:
6+
- [Add enumerations for string properties](https://github.com/NativeScript/nsplugins-internal/issues/169)
7+
8+
## What is the current behavior?
9+
1. Enum-looking properties are difficult to use, because their type is string and they are hard to guess. Example:
10+
```
11+
this._linearAxisZoom.horizontalLocation = "Left";
12+
```
13+
2. Color related properties are not using the Color type, instead they are of type string. Example:
14+
```
15+
annotation.strokeColor = "Red";
16+
```
17+
18+
## What is the new behavior?
19+
1. The enum-looking properties have their enums, so they are easier to use. Example:
20+
```
21+
this._linearAxisZoom.horizontalLocation = ChartAxisHorizontalLocation.Left;
22+
```
23+
2. The Color related properties are using the type especially created for handling colors - Color:
24+
```
25+
annotation.strokeColor = new Color("Red");
26+
```
27+
28+
Related to [this issue](https://github.com/NativeScript/nsplugins-internal/issues/169).
29+
30+
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->
31+
32+
## &#x1F534; BREAKING CHANGES &#x1F534;
33+
34+
1. The following enumerations are created: `ChartSeriesStackMode`, `ChartFontStyle`, `ChartSeriesSelectionMode`, `ChartSelectionMode`, `ChartTrackballSnapMode`, `ChartLegendPosition`, `ChartLegendOffsetOrigin`, `ChartPaletteSeriesState`, `ChartSeriesPaletteMode`, `ChartAxisLabelFitMode`, `ChartAxisLabelLayoutMode`, `ChartAxisHorizontalLocation`, `ChartAxisVerticalLocation`, `ChartAxisPlotMode`, `ChartAxisLabelVisibility`, `ChartAxisDateTimeComponent`, `ChartAnnotationZPosition`. They are used where appropriate.
35+
2. Every property that contains "color" in its name (for example: `strokeColor`, `fillColor`, etc.) is now of type `Color` (was `string`).
36+
37+
Migration steps:
38+
- replace every "magic string" usage with a value from the relevant enum
39+
- replace every "Color string" usage with values of type `Color`
40+
41+
342
## v3.11.1 (2018, December, 11)
443

544
### Fixes:

0 commit comments

Comments
 (0)