layerchart 0.52.0 → 0.52.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -96,7 +96,13 @@ $: xScale = accessor(x)(chartData[0]) instanceof Date ? scaleTime() : scaleLinea
|
|
|
96
96
|
<Axis
|
|
97
97
|
placement={radial ? 'radius' : 'left'}
|
|
98
98
|
grid
|
|
99
|
-
format={(value) =>
|
|
99
|
+
format={(value) => {
|
|
100
|
+
if (seriesLayout === 'stackExpand') {
|
|
101
|
+
return format(value, 'percentRound');
|
|
102
|
+
} else {
|
|
103
|
+
return format(value, undefined, { variant: 'short' });
|
|
104
|
+
}
|
|
105
|
+
}}
|
|
100
106
|
{...typeof axis === 'object' ? axis : null}
|
|
101
107
|
{...props.yAxis}
|
|
102
108
|
/>
|
|
@@ -138,7 +138,13 @@ $: if (stackSeries) {
|
|
|
138
138
|
<Axis
|
|
139
139
|
placement="left"
|
|
140
140
|
grid={isVertical}
|
|
141
|
-
format={(value) =>
|
|
141
|
+
format={(value) => {
|
|
142
|
+
if (isVertical && seriesLayout === 'stackExpand') {
|
|
143
|
+
return format(value, 'percentRound');
|
|
144
|
+
} else {
|
|
145
|
+
return format(value, undefined, { variant: 'short' });
|
|
146
|
+
}
|
|
147
|
+
}}
|
|
142
148
|
{...typeof axis === 'object' ? axis : null}
|
|
143
149
|
{...props.yAxis}
|
|
144
150
|
/>
|
|
@@ -148,7 +154,13 @@ $: if (stackSeries) {
|
|
|
148
154
|
<Axis
|
|
149
155
|
placement="bottom"
|
|
150
156
|
grid={!isVertical}
|
|
151
|
-
format={(value) =>
|
|
157
|
+
format={(value) => {
|
|
158
|
+
if (!isVertical && seriesLayout === 'stackExpand') {
|
|
159
|
+
return format(value, 'percentRound');
|
|
160
|
+
} else {
|
|
161
|
+
return format(value, undefined, { variant: 'short' });
|
|
162
|
+
}
|
|
163
|
+
}}
|
|
152
164
|
{...typeof axis === 'object' ? axis : null}
|
|
153
165
|
{...props.xAxis}
|
|
154
166
|
/>
|