UNPKG

@nativescript-community/ui-chart

Version:

A powerful chart / graph plugin, supporting line, bar, pie, radar, bubble, and candlestick charts as well as scaling, panning and animations.

45 lines 1.78 kB
import { Utils } from '../utils/Utils'; import { BarLineScatterCandleBubbleRenderer } from './BarLineScatterCandleBubbleRenderer'; /** * Created by Philipp Jahoda on 11/07/15. */ export class LineScatterCandleRadarRenderer extends BarLineScatterCandleBubbleRenderer { constructor(animator, viewPortHandler) { super(animator, viewPortHandler); } /** * Draws vertical & horizontal highlight-lines if enabled. * * @param c * @param x x-position of the highlight line intersection * @param y y-position of the highlight line intersection * @param set the currently drawn dataset */ drawHighlightLines(c, x, y, set) { const paint = this.highlightPaint; // set color and stroke-width paint.setColor(set.highlightColor); paint.setStrokeWidth(set.highlightLineWidth); // draw highlighted lines (if enabled) paint.setPathEffect(set.highlightDashPathEffect); // draw vertical highlight lines if (set.drawVerticalHighlightIndicator) { const path = Utils.getTempPath(); // create vertical path path.reset(); path.moveTo(x, this.mViewPortHandler.contentTop); path.lineTo(x, this.mViewPortHandler.contentBottom); c.drawPath(path, paint); } // draw horizontal highlight lines if (set.drawHorizontalHighlightIndicator) { const path = Utils.getTempPath(); // create horizontal path path.reset(); path.moveTo(this.mViewPortHandler.contentLeft, y); path.lineTo(this.mViewPortHandler.contentRight, y); c.drawPath(path, paint); } } } //# sourceMappingURL=LineScatterCandleRadarRenderer.js.map