Closed upsteer closed 4 years ago
I stumbled upon this problem too, but I McGyvered a solution:
myTimeAxis.axisConfigurations().forEach(tierConfiguration =>
tierConfiguration.forEach(function (row) {
if(row.interval === "hour" || row.interval === "minute")
row.formatter = new Plottable.Formatters.time("%H:%M")
})
)
With myTimeAxis
being a Plottable.Axes.Time
object.
I used http://plottablejs.org/tutorials/time-axes/ and https://github.com/d3/d3-time-format/blob/v2.2.3/README.md#isoFormat.
Thank you, that worked wonders!
We have a situation with plottable.
Bug report
Steps to repro:
Expected behavior
The formatter should work for the time axis.
Actual behavior
The formatter for the time axis is completely avoided when formatting the time axis.
Possible Solution
This could have been caused by the
Time._DEFAULT_TIME_AXIS_CONFIGURATIONS
Since it only takes the default values, I would only like to have a variable so that the configs could be updated or rather, instead of defining my custom configs, I would simply like to add/modify these DEFAULT CONFIGURATIONS