amazing-react-charts 0.4.9 → 0.4.10
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.
|
@@ -236,7 +236,7 @@ var VerticalBarChart = function VerticalBarChart(props) {
|
|
|
236
236
|
value = _chartValues$.value;
|
|
237
237
|
var complement = tooltipComplement ? tooltipComplement : '';
|
|
238
238
|
var values = yType === 'time' ? (0, _auxiliarFunctions.timeConvert)(Number(value)) + 'h' : (0, _auxiliarFunctions.takeLabelComplement)(Number(value), yComplement);
|
|
239
|
-
var labelPrint = xType === 'time' ? (0, _auxiliarFunctions.formatTooltip)(axisValueLabel) : axisValueLabel;
|
|
239
|
+
var labelPrint = xType === 'time' ? (0, _auxiliarFunctions.formatTooltip)(axisValueLabel, dateFormat === 'yyyy-MM' ? 'MMM/yy' : 'dd/MM/yyyy') : axisValueLabel;
|
|
240
240
|
return "".concat(label, ": ").concat(labelPrint, " <br>") + "".concat(result, ": ").concat(values, " <br>") + complement;
|
|
241
241
|
};
|
|
242
242
|
|
|
@@ -282,7 +282,7 @@ var VerticalBarChart = function VerticalBarChart(props) {
|
|
|
282
282
|
axisLabel: {
|
|
283
283
|
rotate: rotateLabel && rotateLabel,
|
|
284
284
|
formatter: function formatter(item) {
|
|
285
|
-
return xType === 'time' ? (0, _auxiliarFunctions.formatTime)(item, dateFormat
|
|
285
|
+
return xType === 'time' ? (0, _auxiliarFunctions.formatTime)(item, dateFormat === 'yyyy-MM' ? 'MMM/yy' : 'dd/MM/yyyy') : specialLabel(item);
|
|
286
286
|
},
|
|
287
287
|
interval: 0,
|
|
288
288
|
fontSize: 11
|
package/package.json
CHANGED
|
@@ -226,7 +226,12 @@ const VerticalBarChart = (props: IProps) => {
|
|
|
226
226
|
: takeLabelComplement(Number(value), yComplement)
|
|
227
227
|
|
|
228
228
|
const labelPrint =
|
|
229
|
-
xType === 'time'
|
|
229
|
+
xType === 'time'
|
|
230
|
+
? formatTooltip(
|
|
231
|
+
axisValueLabel,
|
|
232
|
+
dateFormat === 'yyyy-MM' ? 'MMM/yy' : 'dd/MM/yyyy'
|
|
233
|
+
)
|
|
234
|
+
: axisValueLabel
|
|
230
235
|
|
|
231
236
|
return (
|
|
232
237
|
`${label}: ${labelPrint} <br>` + `${result}: ${values} <br>` + complement
|
|
@@ -284,7 +289,7 @@ const VerticalBarChart = (props: IProps) => {
|
|
|
284
289
|
axisLabel: {
|
|
285
290
|
rotate: rotateLabel && rotateLabel,
|
|
286
291
|
formatter: (item: string) => xType === 'time'
|
|
287
|
-
? formatTime(item, dateFormat
|
|
292
|
+
? formatTime(item, dateFormat === 'yyyy-MM' ? 'MMM/yy' : 'dd/MM/yyyy')
|
|
288
293
|
: specialLabel(item),
|
|
289
294
|
interval: 0,
|
|
290
295
|
fontSize: 11
|