@@ -144,7 +144,6 @@ export class LineChartRenderer extends LineRadarRenderer {
144
144
public drawData ( c : Canvas ) {
145
145
let width = this . mViewPortHandler . getChartWidth ( ) ;
146
146
let height = this . mViewPortHandler . getChartHeight ( ) ;
147
- console . log ( 'drawData' , width , height ) ;
148
147
149
148
let drawBitmap = this . mDrawBitmap == null ? null : this . mDrawBitmap . get ( ) ;
150
149
@@ -223,7 +222,7 @@ export class LineChartRenderer extends LineRadarRenderer {
223
222
// this.cubicPath.moveTo(cur[xKey], cur[yKey] * phaseY);
224
223
let index = 2 ;
225
224
226
- for ( let j = firstIndex ; j <= lastIndex ; j ++ ) {
225
+ for ( let j = firstIndex + 1 ; j <= lastIndex ; j ++ ) {
227
226
prev = cur ;
228
227
cur = dataSet . getEntryForIndex ( j ) ;
229
228
if ( cur [ yKey ] === undefined || cur [ yKey ] === null ) {
@@ -288,7 +287,7 @@ export class LineChartRenderer extends LineRadarRenderer {
288
287
// let the spline start
289
288
// outputPath.moveTo(cur[xKey], cur[yKey] * phaseY);
290
289
let index = 2 ;
291
- for ( let j = firstIndex ; j <= lastIndex ; j ++ ) {
290
+ for ( let j = firstIndex + 1 ; j <= lastIndex ; j ++ ) {
292
291
prevPrev = prev ;
293
292
prev = cur ;
294
293
cur = nextIndex == j ? next : dataSet . getEntryForIndex ( j ) ;
@@ -349,7 +348,7 @@ export class LineChartRenderer extends LineRadarRenderer {
349
348
// create a new path
350
349
let currentEntry = null ;
351
350
let previousEntry = entry ;
352
- for ( let x = firstIndex ; x <= lastIndex ; x ++ ) {
351
+ for ( let x = firstIndex + 1 ; x <= lastIndex ; x ++ ) {
353
352
currentEntry = dataSet . getEntryForIndex ( x ) ;
354
353
if ( currentEntry [ yKey ] === undefined || currentEntry [ yKey ] === null ) {
355
354
continue ;
@@ -516,6 +515,7 @@ export class LineChartRenderer extends LineRadarRenderer {
516
515
if ( ! this . mViewPortHandler . isInBoundsLeft ( x ) || ! this . mViewPortHandler . isInBoundsY ( y ) ) continue ;
517
516
518
517
let entry = dataSet . getEntryForIndex ( j / 2 + this . mXBounds . min ) ;
518
+ if ( ! entry ) continue ;
519
519
520
520
if ( dataSet . isDrawValuesEnabled ( ) ) {
521
521
this . drawValue ( c , formatter . getFormattedValue ( entry [ yKey ] ) , x , y - valOffset , dataSet . getValueTextColor ( j / 2 ) ) ;
0 commit comments