amcharts3
amcharts3 copied to clipboard
When the value is greater than 1300, the duration start with "0undefined"
Step
- Access https://www.amcharts.com/demos/duration-on-value-axis/
- Click
Open in jsFiddle
link, and move to http://jsfiddle.net/ - Make some duration value greater than 1300
- Click
Run
button, and the duration start with "0undefined"
OK (the value below 1300)
NG (the value greater than 1301)
Thanks for bringing this to our attention.
Will let you know when the fix is available.
OK, we were able to get to the bottom of it. It's not a bug. Phew ;)
It happens because chart uses custom durationUnits
which do not have "DD" unit. This will solve the issue:
"durationUnits": {
"DD": "d. ",
"hh": "h ",
"mm": "min"
},
@martynasma
I confirm that to add DD
unit to durationUnits
solve the issue.
But I do not want to use DD
unit.
I hope "1,301" minutes will be displayed as "21h 41min", simply.
You can set the "DD" to the empty string, but it has to be there in the durationUnits
.
@martynasma I set the "DD" to the empty string. So, "1,301" minutes is displayed as "021h 41min"
I hope "1,301" minutes will be displayed as "21h 41min", without "DD" setting.
In this chart the value axis is set to be a "duration" axis using following setting:
"duration": "mm",
If you want to revert to simple values, simply remove that line.
@martynasma
If I removed the line "duration": "mm",
, then "1,301" minutes is displayed as "1,301".
This is not a solution. I would like to talk to another engineer.
I'm sorry I did not get your question.
Am I right to assume that you don't want the day part? Just hours and minutes, even if the duration is longer than a day? I.e. "35h 30min"
The chart itself does not have this feature to limit maximum available duration unit.
The workaround would need to be applied through the use of callback functions.
labelFunction for value axis and balloonFunction for graph balloons.
Let me know if you need any assistance with that.
P.S. since you asked for another engineer, I asked my alter ego to respond ;)