@@ -462,7 +462,6 @@ export class LineChartRenderer extends LineRadarRenderer {
462
462
463
463
@profile
464
464
drawLines ( canvas : Canvas , points : number [ ] , offest , length , paint : Paint , matrix : Matrix ) {
465
- console . log ( 'drawLines' , points . length , length , typeof points , Array . isArray ( points ) ) ;
466
465
canvas . drawLines ( points , offest , length , paint , matrix ) ;
467
466
}
468
467
@@ -504,8 +503,10 @@ export class LineChartRenderer extends LineRadarRenderer {
504
503
const positions = trans . generateTransformedValues ( dataSet , this . mAnimator . getPhaseX ( ) , this . mAnimator . getPhaseY ( ) , this . mXBounds . min , this . mXBounds . max ) ;
505
504
const formatter = dataSet . getValueFormatter ( ) ;
506
505
507
- const iconsOffset = Object . assign ( { } , dataSet . getIconsOffset ( ) ) ;
508
-
506
+ const iconsOffset = dataSet . getIconsOffset ( ) ;
507
+ const valuesOffset = dataSet . getValuesOffset ( ) ;
508
+ const drawIcons = dataSet . isDrawIconsEnabled ( ) ;
509
+ const drawValues = dataSet . isDrawValuesEnabled ( ) ;
509
510
for ( let j = 0 ; j < positions . length ; j += 2 ) {
510
511
let x = positions [ j ] ;
511
512
let y = positions [ j + 1 ] ;
@@ -517,11 +518,11 @@ export class LineChartRenderer extends LineRadarRenderer {
517
518
let entry = dataSet . getEntryForIndex ( j / 2 + this . mXBounds . min ) ;
518
519
if ( ! entry ) continue ;
519
520
520
- if ( dataSet . isDrawValuesEnabled ( ) ) {
521
- this . drawValue ( c , formatter . getFormattedValue ( entry [ yKey ] ) , x , y - valOffset , dataSet . getValueTextColor ( j / 2 ) ) ;
521
+ if ( drawValues ) {
522
+ this . drawValue ( c , formatter . getFormattedValue ( entry [ yKey ] ) , valuesOffset . x + x , valuesOffset . y + y - valOffset , dataSet . getValueTextColor ( j / 2 ) ) ;
522
523
}
523
524
524
- if ( entry . icon != null && dataSet . isDrawIconsEnabled ( ) ) {
525
+ if ( drawIcons && entry . icon != null ) {
525
526
let icon = entry . icon ;
526
527
527
528
Utils . drawImage ( c , icon , x + iconsOffset . x , y + iconsOffset . y , icon . getIntrinsicWidth ( ) , icon . getIntrinsicHeight ( ) ) ;
0 commit comments