@@ -852,23 +852,25 @@ export default {
852852 },
853853 tableSparklineDataset () {
854854 return this .relativeDataset .map (ds => {
855+ const source = ds .absoluteValues .map (s => [undefined , null ].includes (s) ? 0 : s);
855856 return {
856857 id: ds .id ,
857858 name: ds .name ,
858859 color: ds .color ,
859- values: ds . absoluteValues . slice (this .slicer . start , this . slicer . end ),
860+ values: this . fillArray (this .maxSeries , source)
860861 }
861862 })
862863 },
863864 tableSparklineConfig () {
864865 return {
866+
867+ responsiveBreakpoint: this .chartConfig .table .responsiveBreakpoint ,
868+ roundingValues: this .chartConfig .table .rounding ,
865869 showAverage: false ,
866870 showMedian: false ,
867871 showTotal: false ,
868- responsiveBreakpoint: this .chartConfig .table .responsiveBreakpoint ,
869- roundingValues: this .chartConfig .table .rounding ,
870872 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 ) ,
872874 thead: {
873875 backgroundColor: this .chartConfig .table .th .backgroundColor ,
874876 color: this .chartConfig .table .th .color ,
@@ -1290,6 +1292,13 @@ export default {
12901292 createStar,
12911293 createPolygonPath,
12921294 // ///////////////////////////// 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+ },
12931302 refreshSlicer () {
12941303 this .slicer = {
12951304 start: 0 ,
0 commit comments