@@ -852,23 +852,25 @@ export default {
852
852
},
853
853
tableSparklineDataset () {
854
854
return this .relativeDataset .map (ds => {
855
+ const source = ds .absoluteValues .map (s => [undefined , null ].includes (s) ? 0 : s);
855
856
return {
856
857
id: ds .id ,
857
858
name: ds .name ,
858
859
color: ds .color ,
859
- values: ds . absoluteValues . slice (this .slicer . start , this . slicer . end ),
860
+ values: this . fillArray (this .maxSeries , source)
860
861
}
861
862
})
862
863
},
863
864
tableSparklineConfig () {
864
865
return {
866
+
867
+ responsiveBreakpoint: this .chartConfig .table .responsiveBreakpoint ,
868
+ roundingValues: this .chartConfig .table .rounding ,
865
869
showAverage: false ,
866
870
showMedian: false ,
867
871
showTotal: false ,
868
- responsiveBreakpoint: this .chartConfig .table .responsiveBreakpoint ,
869
- roundingValues: this .chartConfig .table .rounding ,
870
872
fontFamily: this .chartConfig .chart .fontFamily ,
871
- colNames: this .chartConfig .chart .grid .labels .xAxisLabels .values ,
873
+ colNames: this .chartConfig .chart .grid .labels .xAxisLabels .values . slice ( 0 , this . maxSeries ) ,
872
874
thead: {
873
875
backgroundColor: this .chartConfig .table .th .backgroundColor ,
874
876
color: this .chartConfig .table .th .color ,
@@ -1290,6 +1292,13 @@ export default {
1290
1292
createStar,
1291
1293
createPolygonPath,
1292
1294
// ///////////////////////////// CANVAS /////////////////////////////////
1295
+ fillArray (len , source ) {
1296
+ let res = Array (len).fill (0 );
1297
+ for (let i = 0 ; i < source .length && i < len; i += 1 ) {
1298
+ res[i] = source[i];
1299
+ }
1300
+ return res;
1301
+ },
1293
1302
refreshSlicer () {
1294
1303
this .slicer = {
1295
1304
start: 0 ,
0 commit comments