1
- import { Align , Canvas , Paint , RectF } from '@nativescript-community/ui-canvas' ;
1
+ import { Align , Canvas , Paint , Path , RectF } from '@nativescript-community/ui-canvas' ;
2
2
import { profile } from '@nativescript/core' ;
3
3
import { AxisBase } from '../components/AxisBase' ;
4
4
import { LimitLine } from '../components/LimitLine' ;
@@ -9,13 +9,15 @@ import { BaseCustomRenderer } from './DataRenderer';
9
9
import { Renderer } from './Renderer' ;
10
10
import { MPPointF } from '../utils/MPPointF' ;
11
11
12
+ export type CustomRendererZeroLineFunction = ( c : Canvas , axis : AxisBase , zeroPos : MPPointF , path : Path , paint : Paint ) => void ;
12
13
export type CustomRendererGridLineFunction = ( c : Canvas , axis : AxisBase , rect : RectF , x , y , axisValue , paint : Paint ) => void ;
13
14
export type CustomRendererLimitLineFunction = ( c : Canvas , axis : AxisBase , limitLine : LimitLine , rect : RectF , x : number , paint : Paint ) => void ;
14
15
export type CustomRendererLabelFunction = ( c : Canvas , axis : AxisBase , text : string , x : number , y : number , paint : Paint , anchor ?: MPPointF , angleDegrees ?: number ) => void ;
15
16
export type CustomRendererTickFunction = ( c : Canvas , renderer : AxisRenderer , startX : number , startY : number , stopX : number , stopY : number , paint : Paint ) => void ;
16
17
export interface CustomRenderer extends BaseCustomRenderer {
17
18
drawLabel ?: CustomRendererLabelFunction ;
18
19
drawGridLine ?: CustomRendererGridLineFunction ;
20
+ drawZeroLine ?: CustomRendererZeroLineFunction ;
19
21
drawLimitLine ?: CustomRendererLimitLineFunction ;
20
22
drawMarkTick ?: CustomRendererTickFunction ;
21
23
}
@@ -140,7 +142,6 @@ export abstract class AxisRenderer extends Renderer {
140
142
* @param min - the minimum value in the data object for this axis
141
143
* @param max - the maximum value in the data object for this axis
142
144
*/
143
- @profile
144
145
public computeAxis ( min , max , inverted ) {
145
146
const axis = this . mAxis ;
146
147
if ( ! axis . enabled ) {
0 commit comments