|
51 | 51 | />
|
52 | 52 |
|
53 | 53 | <stacked-area-vis
|
54 |
| - v-if="chartShown && isTypeGrowthStackedArea" |
| 54 | + v-if="chartShown && (isTypeArea || isTypeProportion || isTypeGrowthStackedArea)" |
55 | 55 | :read-only="readOnly"
|
56 | 56 | :domains="domains"
|
57 |
| - :dataset="growthDataset" |
58 |
| - :range="range" |
59 |
| - :interval="interval" |
60 |
| - :curve="chartCurve" |
61 |
| - :y-min="computedGrowthYMin" |
62 |
| - :y-max="computedGrowthYMax" |
63 |
| - :vis-height="visHeight" |
64 |
| - :hover-on="hoverOn" |
65 |
| - :hover-date="hoverDate" |
66 |
| - :dynamic-extent="zoomExtent" |
67 |
| - :zoomed="zoomExtent.length > 0" |
68 |
| - :x-guides="xGuides" |
69 |
| - :y-guides="yGuides" |
70 |
| - :x-axis-dy="tabletBreak ? 8 : 12" |
71 |
| - :y-axis-ticks="5" |
72 |
| - :show-x-axis="false" |
73 |
| - :compare-dates="compareDates" |
74 |
| - :focus-date="focusDate" |
75 |
| - :focus-on="focusOn" |
76 |
| - :incomplete-intervals="incompleteIntervals" |
77 |
| - :dataset-two=" |
78 |
| - chartEnergyRenewablesLine ? renewablesPercentageDataset : [] |
79 |
| - " |
80 |
| - :dataset-two-colour="renewablesLineColour" |
81 |
| - :highlight-domain="highlightId" |
82 |
| - :mobile-screen="tabletBreak" |
83 |
| - :display-prefix="chartDisplayPrefix" |
84 |
| - :should-convert-value="shouldConvertValue" |
85 |
| - :convert-value="convertValue" |
86 |
| - :unit="` ${chartDisplayPrefix}${chartUnit}`" |
87 |
| - :null-check-prop="'_total'" |
88 |
| - :filter-period="filterPeriod" |
89 |
| - :show-total-line="chartEnergyNetLine" |
90 |
| - :total-line-domain="'_total'" |
91 |
| - :class="{ dragging: dragging }" |
92 |
| - :use-offset-diverge="true" |
93 |
| - class="vis-chart" |
94 |
| - @dateOver="handleDateHover" |
95 |
| - @domainOver="handleDomainHover" |
96 |
| - @svgClick="handleSvgClick" |
97 |
| - @enter="handleVisEnter" |
98 |
| - @leave="handleVisLeave" |
99 |
| - @zoomExtent="handleZoomExtent" |
100 |
| - /> |
101 |
| - |
102 |
| - <stacked-area-vis |
103 |
| - v-if="chartShown && (isTypeArea || isTypeProportion)" |
104 |
| - :read-only="readOnly" |
105 |
| - :domains="domains" |
106 |
| - :dataset="stackedAreaDataset" |
| 57 | + :dataset="isTypeGrowthStackedArea ? growthDataset : stackedAreaDataset" |
107 | 58 | :range="range"
|
108 | 59 | :interval="interval"
|
109 | 60 | :curve="chartCurve"
|
110 |
| - :y-min="isTypeArea ? computedYMin : 0" |
111 |
| - :y-max="isTypeArea ? computedYMax : 100" |
| 61 | + :y-min="isTypeGrowthStackedArea ? computedGrowthYMin : isTypeArea ? computedYMin : 0" |
| 62 | + :y-max="isTypeGrowthStackedArea ? computedGrowthYMax : isTypeArea ? computedYMax : 100" |
112 | 63 | :vis-height="visHeight"
|
113 | 64 | :hover-on="hoverOn"
|
114 | 65 | :hover-date="hoverDate"
|
|
138 | 89 | :show-total-line="chartEnergyNetLine"
|
139 | 90 | :total-line-domain="'_total'"
|
140 | 91 | :class="{ dragging: dragging }"
|
141 |
| - :use-offset-diverge="false" |
| 92 | + :use-offset-diverge="isTypeGrowthStackedArea ? true : false" |
142 | 93 | class="vis-chart"
|
143 | 94 | @dateOver="handleDateHover"
|
144 | 95 | @domainOver="handleDomainHover"
|
@@ -1075,7 +1026,13 @@ export default {
|
1075 | 1026 | this.$emit('selectedDataset', this.dataset)
|
1076 | 1027 | },
|
1077 | 1028 |
|
1078 |
| - fuelTechGroupName(val) { |
| 1029 | + zoomExtent() { |
| 1030 | + if (this.isTypeGrowthStackedArea) { |
| 1031 | + this.updateGrowDataset() |
| 1032 | + } |
| 1033 | + }, |
| 1034 | +
|
| 1035 | + fuelTechGroupName() { |
1079 | 1036 | if (this.isTypeGrowthStackedArea) {
|
1080 | 1037 | this.updateGrowDataset()
|
1081 | 1038 | }
|
|
0 commit comments