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.

30 lines (29 loc) 1.14 kB
import { Transformer } from './Transformer'; /** * Transformer class for the HorizontalBarChart. * */ export class TransformerHorizontalBarChart extends Transformer { /** * Prepares the matrix that contains all offsets. * * @param inverted */ prepareMatrixOffset(inverted) { this.mMatrixOffset.reset(); // offset.postTranslate(mOffsetLeft, getHeight() - this.mOffsetBottom); if (!inverted) { this.mMatrixOffset.postTranslate(this.mViewPortHandler.offsetLeft, this.mViewPortHandler.chartHeight - this.mViewPortHandler.offsetBottom); } else { this.mMatrixOffset.setTranslate(-(this.mViewPortHandler.chartWidth - this.mViewPortHandler.offsetRight), this.mViewPortHandler.chartHeight - this.mViewPortHandler.offsetBottom); this.mMatrixOffset.postScale(-1.0, 1.0); } // this.mMatrixOffset.set(offset); // this.mMatrixOffset.reset(); // // this.mMatrixOffset.postTranslate(mOffsetLeft, getHeight() - // this.mOffsetBottom); } } //# sourceMappingURL=TransformerHorizontalBarChart.js.map