Skip to content

Commit 4630f36

Browse files
committed
lint: fixes
1 parent 35ae05f commit 4630f36

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

Diff for: src/charting/renderer/YAxisRenderer.ts

+9-13
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,9 @@ export class YAxisRenderer extends AxisRenderer {
6969

7070
this.drawYLabels(c, xPos, positions, yoffset);
7171
if (dependency == AxisDependency.LEFT) {
72-
this.drawMarkTicket(c, this.mViewPortHandler.contentLeft(), positions, -xoffset/2);
73-
72+
this.drawMarkTicket(c, this.mViewPortHandler.contentLeft(), positions, -xoffset / 2);
7473
} else {
75-
this.drawMarkTicket(c, this.mViewPortHandler.contentRight(),positions, +xoffset/2);
74+
this.drawMarkTicket(c, this.mViewPortHandler.contentRight(), positions, +xoffset / 2);
7675
}
7776
}
7877

@@ -116,20 +115,17 @@ export class YAxisRenderer extends AxisRenderer {
116115
* @param length
117116
*/
118117

119-
protected drawMarkTicket ( c:Canvas, fixedPosition, positions, ticklength) {
118+
protected drawMarkTicket(c: Canvas, fixedPosition, positions, ticklength) {
120119
const mYAxis = this.mYAxis;
121-
if (!mYAxis.isDrawMarkTicksEnabled() ) return;
120+
if (!mYAxis.isDrawMarkTicksEnabled()) return;
122121

123122
const from = mYAxis.isDrawBottomYLabelEntryEnabled() ? 0 : 1;
124-
const to = mYAxis.isDrawTopYLabelEntryEnabled()
125-
? mYAxis.mEntryCount
126-
: (mYAxis.mEntryCount - 1);
123+
const to = mYAxis.isDrawTopYLabelEntryEnabled() ? mYAxis.mEntryCount : mYAxis.mEntryCount - 1;
127124

128125
// draw
129126
for (let i = from; i < to; i++) {
130-
c.drawLine(fixedPosition, positions[i * 2 + 1], fixedPosition+ticklength, positions[i * 2 + 1], this.mAxisLinePaint);
127+
c.drawLine(fixedPosition, positions[i * 2 + 1], fixedPosition + ticklength, positions[i * 2 + 1], this.mAxisLinePaint);
131128
}
132-
133129
}
134130

135131
// protected mRenderGridLinesPath = new Path();
@@ -198,7 +194,7 @@ export class YAxisRenderer extends AxisRenderer {
198194
* @return
199195
*/
200196
protected getTransformedPositions() {
201-
const length= this.mYAxis.mEntryCount * 2
197+
const length = this.mYAxis.mEntryCount * 2;
202198
if (this.mGetTransformedPositionsBuffer.length != length) {
203199
this.mGetTransformedPositionsBuffer = Utils.createArrayBuffer(length);
204200
}
@@ -208,7 +204,7 @@ export class YAxisRenderer extends AxisRenderer {
208204
positions[i] = 0;
209205
positions[i + 1] = this.mYAxis.mEntries[i / 2];
210206
}
211-
const result = Utils.pointsFromBuffer(positions)
207+
const result = Utils.pointsFromBuffer(positions);
212208
this.mTrans.pointValuesToPixel(result);
213209
return Utils.nativeArrayToArray(result);
214210
}
@@ -279,7 +275,7 @@ export class YAxisRenderer extends AxisRenderer {
279275

280276
pts[1] = l.getLimit();
281277
this.mTrans.pointValuesToPixel(pts);
282-
278+
283279
if (lineWidth > 0) {
284280
limitLinePath.moveTo(this.mViewPortHandler.contentLeft(), pts[1]);
285281
limitLinePath.lineTo(this.mViewPortHandler.contentRight(), pts[1]);

0 commit comments

Comments
 (0)