@nativescript-community/ui-chart 1.2.20 → 1.2.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.json +2 -2
  3. package/animation/ChartAnimator2.d.ts +0 -18
  4. package/animation/ChartAnimator2.js +0 -69
  5. package/animation/ChartAnimator2.js.map +0 -1
  6. package/interfaces/dataprovider/BarDataProvider.d.ts +0 -9
  7. package/interfaces/dataprovider/BarLineScatterCandleBubbleDataProvider.d.ts +0 -14
  8. package/interfaces/dataprovider/BubbleDataProvider.d.ts +0 -6
  9. package/interfaces/dataprovider/CandleDataProvider.d.ts +0 -6
  10. package/interfaces/dataprovider/ChartInterface.d.ts +0 -65
  11. package/interfaces/dataprovider/CombinedDataProvider.d.ts +0 -13
  12. package/interfaces/dataprovider/LineDataProvider.d.ts +0 -9
  13. package/interfaces/dataprovider/ScatterDataProvider.d.ts +0 -6
  14. package/interfaces/datasets/IBarDataSet.d.ts +0 -61
  15. package/interfaces/datasets/IBarLineScatterCandleBubbleDataSet.d.ts +0 -14
  16. package/interfaces/datasets/IBubbleDataSet.d.ts +0 -25
  17. package/interfaces/datasets/ICandleDataSet.d.ts +0 -78
  18. package/interfaces/datasets/IDataSet.d.ts +0 -501
  19. package/interfaces/datasets/ILineDataSet.d.ts +0 -106
  20. package/interfaces/datasets/ILineRadarDataSet.d.ts +0 -56
  21. package/interfaces/datasets/ILineScatterCandleRadarDataSet.d.ts +0 -31
  22. package/interfaces/datasets/IPieDataSet.d.ts +0 -67
  23. package/interfaces/datasets/IRadarDataSet.d.ts +0 -27
  24. package/interfaces/datasets/IScatterDataSet.d.ts +0 -36
  25. package/utils/Curve.d.ts +0 -12
  26. package/utils/Curve.js +0 -156
  27. package/utils/Curve.js.map +0 -1
  28. package/utils/MPPointD.d.ts +0 -5
  29. package/utils/MPPointD.js +0 -1
  30. package/utils/MPPointD.js.map +0 -1
  31. package/utils/MPPointF.d.ts +0 -7
  32. package/utils/MPPointF.js +0 -1
  33. package/utils/MPPointF.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,18 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.2.22](https://github.com/nativescript-community/ui-chart/compare/v1.2.21...v1.2.22) (2022-11-13)
7
+
8
+ **Note:** Version bump only for package @nativescript-community/ui-chart
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.2.21](https://github.com/nativescript-community/ui-chart/compare/v1.2.20...v1.2.21) (2022-10-26)
15
+
16
+ **Note:** Version bump only for package @nativescript-community/ui-chart
17
+
6
18
  ## [1.2.20](https://github.com/nativescript-community/ui-chart/compare/v1.2.19...v1.2.20) (2022-10-26)
7
19
 
8
20
  **Note:** Version bump only for package @nativescript-community/ui-chart
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript-community/ui-chart",
3
- "version": "1.2.20",
3
+ "version": "1.2.22",
4
4
  "sideEffects": false,
5
5
  "description": "A powerful chart / graph plugin, supporting line, bar, pie, radar, bubble, and candlestick charts as well as scaling, panning and animations.",
6
6
  "keywords": [
@@ -39,5 +39,5 @@
39
39
  "downsample": "^1.4.0",
40
40
  "number-format.js": "^2.0.9"
41
41
  },
42
- "gitHead": "0ca5369364c119ee4173e092478da3afe5d8ae64"
42
+ "gitHead": "9d5a1cc596a75c275bc462f7ad104280173e5882"
43
43
  }
@@ -1,18 +0,0 @@
1
- import { EasingFunction } from 'additween';
2
- export { EasingFunction };
3
- export declare class ChartAnimator {
4
- private mListener;
5
- protected mPhaseY: number;
6
- protected mPhaseX: number;
7
- constructor(listener?: (state: any) => void);
8
- private startAnim;
9
- private startXAnim;
10
- private startYAnim;
11
- animateX(durationMillis: any, easing?: EasingFunction): void;
12
- animateXY(durationMillisX: any, durationMillisY: any, easingX?: EasingFunction, easingY?: EasingFunction): void;
13
- animateY(durationMillis: any, easing?: EasingFunction): void;
14
- getPhaseY(): number;
15
- setPhaseY(phase: any): void;
16
- getPhaseX(): number;
17
- setPhaseX(phase: any): void;
18
- }
@@ -1,69 +0,0 @@
1
- import { time } from '@nativescript/core/profiling';
2
- import { AdditiveTweening } from 'additween';
3
- if (!global.window) {
4
- window = global.window = {
5
- requestAnimationFrame,
6
- cancelAnimationFrame,
7
- performance: {
8
- now: time
9
- }
10
- };
11
- }
12
- function clamp(value) {
13
- return Math.min(1, Math.max(0, value));
14
- }
15
- class Tween extends AdditiveTweening {
16
- }
17
- export class ChartAnimator {
18
- constructor(listener) {
19
- this.mPhaseY = 1;
20
- this.mPhaseX = 1;
21
- this.mListener = listener;
22
- }
23
- startAnim(duration, easing, listener) {
24
- const anim = new Tween({
25
- onRender: (state) => {
26
- if (listener) {
27
- listener(state);
28
- }
29
- }
30
- });
31
- anim.tween({ value: 0 }, { value: 1 }, duration);
32
- return anim;
33
- }
34
- startXAnim(duration, easing, listener) {
35
- return this.startAnim(duration, easing, (state) => {
36
- this.setPhaseX(state.value);
37
- listener === null || listener === void 0 ? void 0 : listener(state);
38
- });
39
- }
40
- startYAnim(duration, easing, listener) {
41
- return this.startAnim(duration, easing, (state) => {
42
- this.setPhaseY(state.value);
43
- listener === null || listener === void 0 ? void 0 : listener(state);
44
- });
45
- }
46
- animateX(durationMillis, easing) {
47
- this.startXAnim(durationMillis, easing, this.mListener);
48
- }
49
- animateXY(durationMillisX, durationMillisY, easingX, easingY) {
50
- this.startXAnim(durationMillisX, easingX, durationMillisX > durationMillisY ? this.mListener : undefined);
51
- this.startYAnim(durationMillisY, easingY || easingX, durationMillisX > durationMillisY ? undefined : this.mListener);
52
- }
53
- animateY(durationMillis, easing) {
54
- this.startYAnim(durationMillis, easing, this.mListener);
55
- }
56
- getPhaseY() {
57
- return this.mPhaseY;
58
- }
59
- setPhaseY(phase) {
60
- this.mPhaseY = clamp(phase);
61
- }
62
- getPhaseX() {
63
- return this.mPhaseX;
64
- }
65
- setPhaseX(phase) {
66
- this.mPhaseX = clamp(phase);
67
- }
68
- }
69
- //# sourceMappingURL=ChartAnimator2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChartAnimator2.js","sourceRoot":"../src/","sources":["animation/ChartAnimator2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAkB,MAAM,WAAW,CAAC;AAE7D,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;IAChB,MAAM,GAAG,MAAM,CAAC,MAAM,GAAG;QACrB,qBAAqB;QACrB,oBAAoB;QACpB,WAAW,EAAE;YACT,GAAG,EAAE,IAAI;SACZ;KACG,CAAC;CACZ;AAED,SAAS,KAAK,CAAC,KAAK;IAChB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,KAAwC,SAAQ,gBAAmB;CAAG;AAC5E,MAAM,OAAO,aAAa;IAUtB,YAAY,QAA0B;QAL5B,YAAO,GAAG,CAAC,CAAC;QAGZ,YAAO,GAAG,CAAC,CAAC;QAGlB,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC9B,CAAC;IAEO,SAAS,CAAC,QAAQ,EAAE,MAAuB,EAAE,QAA0B;QAC3E,MAAM,IAAI,GAAG,IAAI,KAAK,CAAC;YACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;gBAChB,IAAI,QAAQ,EAAE;oBACV,QAAQ,CAAC,KAAK,CAAC,CAAC;iBACnB;YACL,CAAC;SACJ,CAAC,CAAC;QACH,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAC;QACjD,OAAO,IAAI,CAAC;IAChB,CAAC;IACO,UAAU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,CAAC;IAOM,SAAS;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAOM,SAAS,CAAC,KAAK;QAClB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;IAOM,SAAS;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAOM,SAAS,CAAC,KAAK;QAClB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IAChC,CAAC;CACJ"}
@@ -1,9 +0,0 @@
1
- import { BarLineScatterCandleBubbleDataProvider } from './BarLineScatterCandleBubbleDataProvider';
2
- import { BarData } from '../../data/BarData';
3
-
4
- export interface BarDataProvider extends BarLineScatterCandleBubbleDataProvider {
5
- getBarData(): BarData;
6
- isDrawBarShadowEnabled(): boolean;
7
- isDrawValueAboveBarEnabled(): boolean;
8
- isHighlightFullBarEnabled(): boolean;
9
- }
@@ -1,14 +0,0 @@
1
- import { ChartInterface } from './ChartInterface';
2
- import { BarLineScatterCandleBubbleData } from '../../data/BarLineScatterCandleBubbleData';
3
- import { AxisDependency } from '../../components/YAxis';
4
- import { Transformer } from '../../utils/Transformer';
5
-
6
- export interface BarLineScatterCandleBubbleDataProvider extends ChartInterface {
7
- getTransformer(axis?: AxisDependency): Transformer;
8
- isInverted(axis: AxisDependency);
9
-
10
- getLowestVisibleX();
11
- getHighestVisibleX();
12
-
13
- getData(): BarLineScatterCandleBubbleData<any, any>;
14
- }
@@ -1,6 +0,0 @@
1
- import { BubbleData } from '../../data/BubbleData';
2
- import { BarLineScatterCandleBubbleDataProvider } from './BarLineScatterCandleBubbleDataProvider';
3
-
4
- export interface BubbleDataProvider extends BarLineScatterCandleBubbleDataProvider {
5
- getBubbleData(): BubbleData;
6
- }
@@ -1,6 +0,0 @@
1
- import { CandleData } from '../../data/CandleData';
2
- import { BarLineScatterCandleBubbleDataProvider } from './BarLineScatterCandleBubbleDataProvider';
3
-
4
- export interface CandleDataProvider extends BarLineScatterCandleBubbleDataProvider {
5
- getCandleData(): CandleData;
6
- }
@@ -1,65 +0,0 @@
1
- import { MPPointF } from '../../utils/MPPointF';
2
- import { ValueFormatter } from '../../formatter/ValueFormatter';
3
- import { ChartData } from '../../data/ChartData';
4
- import { Rect } from '@nativescript-community/ui-canvas';
5
-
6
- /**
7
- * Interface that provides everything there is to know about the dimensions,
8
- * bounds, and range of the chart.
9
- *
10
-
11
- */
12
- export interface ChartInterface {
13
- /**
14
- * Returns the minimum x value of the chart, regardless of zoom or translation.
15
- *
16
- * @return
17
- */
18
- getXChartMin();
19
-
20
- /**
21
- * Returns the maximum x value of the chart, regardless of zoom or translation.
22
- *
23
- * @return
24
- */
25
- getXChartMax();
26
-
27
- getXRange();
28
-
29
- /**
30
- * Returns the minimum y value of the chart, regardless of zoom or translation.
31
- *
32
- * @return
33
- */
34
- getYChartMin();
35
-
36
- /**
37
- * Returns the maximum y value of the chart, regardless of zoom or translation.
38
- *
39
- * @return
40
- */
41
- getYChartMax();
42
-
43
- /**
44
- * Returns the maximum distance in scren dp a touch can be away from an entry to cause it to get highlighted.
45
- *
46
- * @return
47
- */
48
- getMaxHighlightDistance();
49
-
50
- getMeasuredWidth();
51
-
52
- getMeasuredHeight();
53
-
54
- getCenterOfView(): MPPointF;
55
-
56
- getCenterOffsets(): MPPointF;
57
-
58
- getContentRect(): Rect;
59
-
60
- getDefaultValueFormatter(): ValueFormatter;
61
-
62
- getData(): ChartData<any, any>;
63
-
64
- getMaxVisibleCount();
65
- }
@@ -1,13 +0,0 @@
1
- import { CombinedData } from '../../data/CombinedData';
2
- import { BubbleDataProvider } from './BubbleDataProvider';
3
- import { CandleDataProvider } from './CandleDataProvider';
4
- import { LineDataProvider } from './LineDataProvider';
5
- import { ScatterDataProvider } from './ScatterDataProvider';
6
- import { BarDataProvider } from './BarDataProvider';
7
-
8
- /**
9
- * Created by philipp on 11/06/16.
10
- */
11
- export interface CombinedDataProvider extends LineDataProvider, BarDataProvider, BubbleDataProvider, CandleDataProvider, ScatterDataProvider {
12
- getCombinedData(): CombinedData;
13
- }
@@ -1,9 +0,0 @@
1
- import { LineData } from '../../data/LineData';
2
- import { BarLineScatterCandleBubbleDataProvider } from './BarLineScatterCandleBubbleDataProvider';
3
- import { AxisDependency } from '../../components/YAxis';
4
-
5
- export interface LineDataProvider extends BarLineScatterCandleBubbleDataProvider {
6
- getLineData(): LineData;
7
-
8
- getAxis(dependency: AxisDependency);
9
- }
@@ -1,6 +0,0 @@
1
- import { ScatterData } from '../../data/ScatterData';
2
- import { BarLineScatterCandleBubbleDataProvider } from './BarLineScatterCandleBubbleDataProvider';
3
-
4
- export interface ScatterDataProvider extends BarLineScatterCandleBubbleDataProvider {
5
- getScatterData(): ScatterData;
6
- }
@@ -1,61 +0,0 @@
1
- import { BarEntry } from '../../data/BarEntry';
2
- import { IBarLineScatterCandleBubbleDataSet } from './IBarLineScatterCandleBubbleDataSet';
3
-
4
- /**
5
- * Created by philipp on 21/10/15.
6
- */
7
- export interface IBarDataSet extends IBarLineScatterCandleBubbleDataSet<BarEntry> {
8
- /**
9
- * Returns true if this DataSet is stacked (stacksize > 1) or not.
10
- *
11
- * @return
12
- */
13
- isStacked(): boolean;
14
-
15
- /**
16
- * Returns the maximum number of bars that can be stacked upon another in
17
- * this DataSet. This should return 1 for non stacked bars, and > 1 for stacked bars.
18
- *
19
- * @return
20
- */
21
- getStackSize();
22
-
23
- /**
24
- * Returns the color used for drawing the bar-shadows. The bar shadows is a
25
- * surface behind the bar that indicates the maximum value.
26
- *
27
- * @return
28
- */
29
- getBarShadowColor();
30
-
31
- /**
32
- * Returns the width used for drawing borders around the bars.
33
- * If borderWidth == 0, no border will be drawn.
34
- *
35
- * @return
36
- */
37
- getBarBorderWidth();
38
-
39
- /**
40
- * Returns the color drawing borders around the bars.
41
- *
42
- * @return
43
- */
44
- getBarBorderColor();
45
-
46
- /**
47
- * Returns the alpha value (transparency) that is used for drawing the
48
- * highlight indicator.
49
- *
50
- * @return
51
- */
52
- getHighLightAlpha();
53
-
54
- /**
55
- * Returns the labels used for the different value-stacks in the legend.
56
- * This is only relevant for stacked bar entries.
57
- *
58
- * @return
59
- */
60
- getStackLabels(): string[];
61
- }
@@ -1,14 +0,0 @@
1
- import { Entry } from '../../data/Entry';
2
- import { IDataSet } from './IDataSet';
3
-
4
- /**
5
- * Created by philipp on 21/10/15.
6
- */
7
- export interface IBarLineScatterCandleBubbleDataSet<T extends Entry> extends IDataSet<T> {
8
- /**
9
- * Returns the color that is used for drawing the highlight indicators.
10
- *
11
- * @return
12
- */
13
- getHighLightColor();
14
- }
@@ -1,25 +0,0 @@
1
- /**
2
- * Created by philipp on 21/10/15.
3
- */
4
- import { IBarLineScatterCandleBubbleDataSet } from './IBarLineScatterCandleBubbleDataSet';
5
- import { BubbleEntry } from '../../data/BubbleEntry';
6
-
7
- export interface IBubbleDataSet extends IBarLineScatterCandleBubbleDataSet<BubbleEntry> {
8
- /**
9
- * Sets the width of the circle that surrounds the bubble when highlighted,
10
- * in dp.
11
- *
12
- * @param width
13
- */
14
- setHighlightCircleWidth(width: number);
15
-
16
- getMaxSize(): number;
17
-
18
- isNormalizeSizeEnabled(): boolean;
19
-
20
- /**
21
- * Returns the width of the highlight-circle that surrounds the bubble
22
- * @return
23
- */
24
- getHighlightCircleWidth(): number;
25
- }
@@ -1,78 +0,0 @@
1
- import { ILineScatterCandleRadarDataSet } from './ILineScatterCandleRadarDataSet';
2
- import { CandleEntry } from '../../data/CandleEntry';
3
-
4
- export interface ICandleDataSet extends ILineScatterCandleRadarDataSet<CandleEntry> {
5
- /**
6
- * Returns the space that is left out on the left and right side of each
7
- * candle.
8
- *
9
- * @return
10
- */
11
- getBarSpace();
12
-
13
- /**
14
- * Returns whether the candle bars should show?
15
- * When false, only "ticks" will show
16
- *
17
- * - default: true
18
- *
19
- * @return
20
- */
21
- getShowCandleBar();
22
-
23
- /**
24
- * Returns the width of the candle-shadow-line in pixels.
25
- *
26
- * @return
27
- */
28
- getShadowWidth();
29
-
30
- /**
31
- * Returns shadow color for all entries
32
- *
33
- * @return
34
- */
35
- getShadowColor();
36
-
37
- /**
38
- * Returns the neutral color (for open == close)
39
- *
40
- * @return
41
- */
42
- getNeutralColor();
43
-
44
- /**
45
- * Returns the increasing color (for open < close).
46
- *
47
- * @return
48
- */
49
- getIncreasingColor();
50
-
51
- /**
52
- * Returns the decreasing color (for open > close).
53
- *
54
- * @return
55
- */
56
- getDecreasingColor();
57
-
58
- /**
59
- * Returns palet style when open < close
60
- *
61
- * @return
62
- */
63
- getIncreasingPaintStyle();
64
-
65
- /**
66
- * Returns palet style when open > close
67
- *
68
- * @return
69
- */
70
- getDecreasingPaintStyle();
71
-
72
- /**
73
- * Is the shadow color same as the candle color?
74
- *
75
- * @return
76
- */
77
- getShadowColorSameAsCandle();
78
- }