|
362 | 362 |
|
363 | 363 | <!-- X LABELS BAR --> |
364 | 364 | <g v-if="(chartConfig.bar.labels.show || chartConfig.bar.serieName.show) && mutableConfig.dataLabels.show"> |
365 | | - <g v-for="(serie, i) in barSet" :key="`xLabel_bar_${i}`" :class="`xLabel_bar_${i}`"> |
| 365 | + <g v-for="(serie, i) in barSet" :key="`xLabel_bar_${i}`" :class="`xLabel_bar_${i}`" :style="`opacity:${selectedScale ? selectedScale === serie.id ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`"> |
366 | 366 | <g v-for="(plot, j) in serie.plots" :key="`xLabel_bar_${i}_${j}`"> |
367 | 367 | <text |
368 | 368 | :data-cy="`xy-bar-label-x-${i}-${j}`" |
|
392 | 392 |
|
393 | 393 | <!-- X LABELS PLOT --> |
394 | 394 | <g v-if="chartConfig.plot.labels.show && mutableConfig.dataLabels.show"> |
395 | | - <g v-for="(serie, i) in plotSet" :key="`xLabel_plot_${i}`" :class="`xLabel_plot_${i}`"> |
| 395 | + <g v-for="(serie, i) in plotSet" :key="`xLabel_plot_${i}`" :class="`xLabel_plot_${i}`" :style="`opacity:${selectedScale ? selectedScale === serie.id ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`"> |
396 | 396 | <g v-for="(plot, j) in serie.plots" :key="`xLabel_plot_${i}_${j}`"> |
397 | 397 | <text |
398 | 398 | :data-cy="`xy-plot-label-x-${i}-${j}`" |
|
437 | 437 |
|
438 | 438 | <!-- X LABELS LINE --> |
439 | 439 | <g v-if="chartConfig.line.labels.show && mutableConfig.dataLabels.show"> |
440 | | - <g v-for="(serie, i) in lineSet" :key="`xLabel_line_${i}`" :class="`xLabel_line_${i}`"> |
| 440 | + <g v-for="(serie, i) in lineSet" :key="`xLabel_line_${i}`" :class="`xLabel_line_${i}`" :style="`opacity:${selectedScale ? selectedScale === serie.id ? 1 : 0.2 : 1};transition:opacity 0.2s ease-in-out`"> |
441 | 441 | <g v-for="(plot, j) in serie.plots" :key="`xLabel_line_${i}_${j}`"> |
442 | 442 | <text |
443 | 443 | :data-cy="`xy-line-label-x-${i}-${j}`" |
@@ -1192,7 +1192,7 @@ export default { |
1192 | 1192 | ...datapoint, |
1193 | 1193 | curve, |
1194 | 1194 | plots, |
1195 | | - area: !datapoint.useArea ? '' : this.createArea(plots) |
| 1195 | + area: !datapoint.useArea ? '' : this.chartConfig.chart.grid.labels.yAxis.useIndividualScale ? this.createIndividualArea(plots, this.drawingArea.bottom) : this.createArea(plots) |
1196 | 1196 | } |
1197 | 1197 | }) |
1198 | 1198 | }, |
@@ -1634,6 +1634,15 @@ export default { |
1634 | 1634 | }); |
1635 | 1635 | return [ start.x, start.y, ...path, end.x, end.y].toString(); |
1636 | 1636 | }, |
| 1637 | + createIndividualArea(plots, zero) { |
| 1638 | + const start = { x: plots[0].x, y: zero }; |
| 1639 | + const end = { x: plots.at(-1).x, y: zero }; |
| 1640 | + const path = []; |
| 1641 | + plots.forEach(plot => { |
| 1642 | + path.push(`${plot.x},${plot.y} `); |
| 1643 | + }); |
| 1644 | + return [ start.x, start.y, ...path, end.x, end.y].toString(); |
| 1645 | + }, |
1637 | 1646 | createStar, |
1638 | 1647 | createPolygonPath, |
1639 | 1648 | /////////////////////////////// CANVAS ///////////////////////////////// |
|
0 commit comments