|
414 | 414 | FINAL_CONFIG.chart.grid.labels.yAxis.formatter, |
415 | 415 | yLabel.value, |
416 | 416 | dataLabel({ |
417 | | - p:FINAL_CONFIG.chart.labels.prefix, |
| 417 | + p: yLabel.prefix, |
418 | 418 | v: yLabel.value, |
419 | | - s: FINAL_CONFIG.chart.labels.suffix, |
| 419 | + s: yLabel.suffix, |
420 | 420 | r: 1, |
421 | | - }) |
| 421 | + }), |
| 422 | + { datapoint: yLabel.datapoint, seriesIndex: j } |
422 | 423 | ) |
423 | 424 | }} |
424 | 425 | </text> |
|
449 | 450 | FINAL_CONFIG.chart.grid.labels.yAxis.formatter, |
450 | 451 | yLabel.value, |
451 | 452 | dataLabel({ |
452 | | - p:FINAL_CONFIG.chart.labels.prefix, |
| 453 | + p: yLabel.prefix, |
453 | 454 | v: yLabel.value, |
454 | | - s: FINAL_CONFIG.chart.labels.suffix, |
| 455 | + s: yLabel.suffix, |
455 | 456 | r: 1, |
456 | 457 | })) : '' |
457 | 458 | }} |
|
669 | 670 | FINAL_CONFIG.bar.labels.formatter, |
670 | 671 | plot.value, |
671 | 672 | dataLabel({ |
672 | | - p:FINAL_CONFIG.chart.labels.prefix, |
| 673 | + p: serie.prefix || FINAL_CONFIG.chart.labels.prefix, |
673 | 674 | v: plot.value, |
674 | | - s: FINAL_CONFIG.chart.labels.suffix, |
| 675 | + s: serie.suffix || FINAL_CONFIG.chart.labels.suffix, |
675 | 676 | r: FINAL_CONFIG.bar.labels.rounding, |
676 | 677 | }), |
677 | 678 | { |
|
713 | 714 | FINAL_CONFIG.plot.labels.formatter, |
714 | 715 | plot.value, |
715 | 716 | dataLabel({ |
716 | | - p:FINAL_CONFIG.chart.labels.prefix, |
| 717 | + p: serie.prefix || FINAL_CONFIG.chart.labels.prefix, |
717 | 718 | v: plot.value, |
718 | | - s: FINAL_CONFIG.chart.labels.suffix, |
| 719 | + s: serie.suffix || FINAL_CONFIG.chart.labels.suffix, |
719 | 720 | r: FINAL_CONFIG.plot.labels.rounding, |
720 | 721 | }), |
721 | 722 | { |
|
772 | 773 | FINAL_CONFIG.line.labels.formatter, |
773 | 774 | plot.value, |
774 | 775 | dataLabel({ |
775 | | - p:FINAL_CONFIG.chart.labels.prefix, |
| 776 | + p: serie.prefix || FINAL_CONFIG.chart.labels.prefix, |
776 | 777 | v: plot.value, |
777 | | - s: FINAL_CONFIG.chart.labels.suffix, |
| 778 | + s: serie.suffix || FINAL_CONFIG.chart.labels.suffix, |
778 | 779 | r: FINAL_CONFIG.line.labels.rounding, |
779 | 780 | }), |
780 | 781 | { |
@@ -1648,15 +1649,21 @@ export default { |
1648 | 1649 | const scaleYLabels = individualScale.ticks.map(t => { |
1649 | 1650 | return { |
1650 | 1651 | y: t >= 0 ? zeroPosition - (individualHeight * (t / individualMax)) : zeroPosition + (individualHeight * Math.abs(t) / individualMax), |
1651 | | - value: t |
| 1652 | + value: t, |
| 1653 | + prefix: datapoint.prefix || this.FINAL_CONFIG.chart.labels.prefix, |
| 1654 | + suffix: datapoint.suffix || this.FINAL_CONFIG.chart.labels.suffix, |
| 1655 | + datapoint |
1652 | 1656 | } |
1653 | 1657 | }) |
1654 | 1658 |
|
1655 | 1659 | const autoScaleYLabels = autoScaleSteps.ticks.map(t => { |
1656 | 1660 | const v = (t - autoScaleSteps.min) / (autoScaleSteps.max - autoScaleSteps.min); |
1657 | 1661 | return { |
1658 | 1662 | y: t >= 0 ? autoScaleZeroPosition - (individualHeight * v) : autoScaleZeroPosition + (individualHeight * v), |
1659 | | - value: t |
| 1663 | + value: t, |
| 1664 | + prefix: datapoint.prefix || this.FINAL_CONFIG.chart.labels.prefix, |
| 1665 | + suffix: datapoint.suffix || this.FINAL_CONFIG.chart.labels.suffix, |
| 1666 | + datapoint |
1660 | 1667 | } |
1661 | 1668 | }); |
1662 | 1669 |
|
@@ -1758,15 +1765,21 @@ export default { |
1758 | 1765 | const scaleYLabels = individualScale.ticks.map(t => { |
1759 | 1766 | return { |
1760 | 1767 | y: t >= 0 ? zeroPosition - (individualHeight * (t / individualMax)) : zeroPosition + (individualHeight * Math.abs(t) / individualMax), |
1761 | | - value: t |
| 1768 | + value: t, |
| 1769 | + prefix: datapoint.prefix || this.FINAL_CONFIG.chart.labels.prefix, |
| 1770 | + suffix: datapoint.suffix || this.FINAL_CONFIG.chart.labels.suffix, |
| 1771 | + datapoint |
1762 | 1772 | } |
1763 | 1773 | }) |
1764 | 1774 |
|
1765 | 1775 | const autoScaleYLabels = autoScaleSteps.ticks.map(t => { |
1766 | 1776 | const v = (t - autoScaleSteps.min) / (autoScaleSteps.max - autoScaleSteps.min); |
1767 | 1777 | return { |
1768 | 1778 | y: t >= 0 ? autoScaleZeroPosition - (individualHeight * v) : autoScaleZeroPosition + (individualHeight * v), |
1769 | | - value: t |
| 1779 | + value: t, |
| 1780 | + prefix: datapoint.prefix || this.FINAL_CONFIG.chart.labels.prefix, |
| 1781 | + suffix: datapoint.suffix || this.FINAL_CONFIG.chart.labels.suffix, |
| 1782 | + datapoint |
1770 | 1783 | } |
1771 | 1784 | }); |
1772 | 1785 |
|
@@ -1856,15 +1869,21 @@ export default { |
1856 | 1869 | const scaleYLabels = individualScale.ticks.map(t => { |
1857 | 1870 | return { |
1858 | 1871 | y: t >= 0 ? zeroPosition - (individualHeight * (t / individualMax)) : zeroPosition + (individualHeight * Math.abs(t) / individualMax), |
1859 | | - value: t |
| 1872 | + value: t, |
| 1873 | + prefix: datapoint.prefix || this.FINAL_CONFIG.chart.labels.prefix, |
| 1874 | + suffix: datapoint.suffix || this.FINAL_CONFIG.chart.labels.suffix, |
| 1875 | + datapoint, |
1860 | 1876 | } |
1861 | 1877 | }) |
1862 | 1878 |
|
1863 | 1879 | const autoScaleYLabels = autoScaleSteps.ticks.map(t => { |
1864 | 1880 | const v = (t - autoScaleSteps.min) / (autoScaleSteps.max - autoScaleSteps.min); |
1865 | 1881 | return { |
1866 | 1882 | y: t >= 0 ? autoScaleZeroPosition - (individualHeight * v) : autoScaleZeroPosition + (individualHeight * v), |
1867 | | - value: t |
| 1883 | + value: t, |
| 1884 | + prefix: datapoint.prefix || this.FINAL_CONFIG.chart.labels.prefix, |
| 1885 | + suffix: datapoint.suffix || this.FINAL_CONFIG.chart.labels.suffix, |
| 1886 | + datapoint |
1868 | 1887 | } |
1869 | 1888 | }); |
1870 | 1889 |
|
@@ -2135,7 +2154,9 @@ export default { |
2135 | 2154 | return this.niceScale.ticks.map(t => { |
2136 | 2155 | return { |
2137 | 2156 | y: t >= 0 ? this.zero - (this.drawingArea.height * this.ratioToMax(t)) : this.zero + (this.drawingArea.height * this.ratioToMax(Math.abs(t))), |
2138 | | - value: t |
| 2157 | + value: t, |
| 2158 | + prefix: this.FINAL_CONFIG.chart.labels.prefix, |
| 2159 | + suffix: this.FINAL_CONFIG.chart.labels.suffix, |
2139 | 2160 | } |
2140 | 2161 | }) |
2141 | 2162 | }, |
|
0 commit comments