1
- import { IDataSet } from '../interfaces/datasets/IDataSet' ;
2
- import { DataSet } from '../data/DataSet' ;
3
- import { Entry } from '../data/Entry' ;
4
- import { ChartData } from '../data/ChartData' ;
5
- import { ChartInterface } from '../interfaces/dataprovider/ChartInterface' ;
1
+ import { PanGestureHandlerOptions , PinchGestureHandlerOptions , TapGestureHandlerOptions } from '@nativescript-community/gesturehandler' ;
6
2
import { Align , Canvas , CanvasView , Paint } from '@nativescript-community/ui-canvas' ;
7
- import { DefaultValueFormatter } from '../formatter/DefaultValueFormatter' ;
8
- import { CLog , CLogTypes , Utils } from '../utils/Utils' ;
9
- import { Color } from '@nativescript/core/color' ;
10
- import { Highlight } from '../highlight/Highlight' ;
11
- import { Legend } from '../components/Legend' ;
12
- import { ViewPortHandler } from '../utils/ViewPortHandler' ;
13
- import { XAxis } from '../components/XAxis' ;
3
+ import { EventData , Trace } from '@nativescript/core' ;
4
+ import { layout } from '@nativescript/core/utils/utils' ;
5
+ import { ChartAnimator , EasingFunction } from '../animation/ChartAnimator' ;
14
6
import { Description } from '../components/Description' ;
15
- import { DataRenderer } from '../renderer/DataRenderer' ;
16
7
import { IMarker } from '../components/IMarker' ;
17
- import { LegendRenderer } from '../renderer/LegendRenderer' ;
8
+ import { Legend } from '../components/Legend' ;
9
+ import { XAxis } from '../components/XAxis' ;
10
+ import { ChartData } from '../data/ChartData' ;
11
+ import { Entry } from '../data/Entry' ;
12
+ import { DefaultValueFormatter } from '../formatter/DefaultValueFormatter' ;
13
+ import { Highlight } from '../highlight/Highlight' ;
18
14
import { IHighlighter } from '../highlight/IHighlighter' ;
19
- import { profile } from '@nativescript/core/profiling ' ;
20
- import { ChartAnimator , EasingFunction } from '../animation/ChartAnimator ' ;
15
+ import { ChartInterface } from '../interfaces/dataprovider/ChartInterface ' ;
16
+ import { IDataSet } from '../interfaces/datasets/IDataSet ' ;
21
17
import { ViewPortJob } from '../jobs/ViewPortJob' ;
22
18
import { ChartTouchListener } from '../listener/ChartTouchListener' ;
23
- import { layout } from '@nativescript/core/utils/utils ' ;
24
- import { EventData , Trace } from '@nativescript/core ' ;
25
- import { addWeakEventListener , removeWeakEventListener } from '@nativescript/core/ui/core/weak-event-listener ' ;
26
- import { PanGestureHandlerOptions , PinchGestureHandlerOptions , TapGestureHandlerOptions } from '@nativescript-community/gesturehandler ' ;
19
+ import { DataRenderer } from '../renderer/DataRenderer ' ;
20
+ import { LegendRenderer } from '../renderer/LegendRenderer ' ;
21
+ import { CLog , CLogTypes , Utils } from '../utils/Utils ' ;
22
+ import { ViewPortHandler } from '../utils/ViewPortHandler ' ;
27
23
28
24
const LOG_TAG = 'NSChart' ;
29
25
@@ -47,11 +43,6 @@ export abstract class Chart<U extends Entry, D extends IDataSet<U>, T extends Ch
47
43
abstract getYChartMax ( ) ;
48
44
abstract getMaxVisibleCount ( ) ;
49
45
50
- /**
51
- * flag that indicates if logging is enabled or not
52
- */
53
- protected mLogEnabled ;
54
-
55
46
/**
56
47
* object that holds all data that was originally set for the chart, before
57
48
* it was modified or any filtering algorithms had been applied
@@ -176,7 +167,7 @@ export abstract class Chart<U extends Entry, D extends IDataSet<U>, T extends Ch
176
167
/**
177
168
* tasks to be done after the view is setup
178
169
*/
179
- protected mJobs = [ ] ;
170
+ protected mJobs = [ ] ;
180
171
181
172
/**
182
173
* default constructor for initialization in code
@@ -199,7 +190,7 @@ export abstract class Chart<U extends Entry, D extends IDataSet<U>, T extends Ch
199
190
* initialize all paints and stuff
200
191
*/
201
192
protected init ( ) {
202
- this . mAnimator = new ChartAnimator ( ( ) => {
193
+ this . mAnimator = new ChartAnimator ( ( state ) => {
203
194
// during animations we dont need to compute axis things
204
195
this . noComputeOnNextDraw = true ;
205
196
this . invalidate ( ) ;
@@ -918,27 +909,6 @@ export abstract class Chart<U extends Entry, D extends IDataSet<U>, T extends Ch
918
909
return this . mExtraLeftOffset ;
919
910
}
920
911
921
- /**
922
- * Set this to true to enable logcat outputs for the chart. Beware that
923
- * logcat output decreases rendering performance. Default: disabled.
924
- *
925
- * @deprecated use Nativescript Trace with ChartTraceCategory
926
- * @param enabled
927
- */
928
- public setLogEnabled ( enabled ) {
929
- this . mLogEnabled = enabled ;
930
- }
931
-
932
- /**
933
- * Returns true if log-output is enabled for the chart, fals if not.
934
- *
935
- * @deprecated use Nativescript Trace with ChartTraceCategory
936
- * @return
937
- */
938
- public isLogEnabled ( ) {
939
- return this . mLogEnabled ;
940
- }
941
-
942
912
/**
943
913
* Sets the text that informs the user that there is no data available with
944
914
* which to draw the chart.
@@ -1304,7 +1274,6 @@ export abstract class Chart<U extends Entry, D extends IDataSet<U>, T extends Ch
1304
1274
// return saveToGallery(fileName, "", "MPAndroidChart-Library Save", Bitmap.CompressFormat.PNG, 40);
1305
1275
// }
1306
1276
1307
-
1308
1277
public removeViewportJob ( job ) {
1309
1278
const index = this . mJobs . indexOf ( job ) ;
1310
1279
if ( index >= 0 ) {
0 commit comments