Open davestewart opened 1 month ago
+1, I am having the same problem.
Right now I am using the following workaround:
index
values to data
(which already contains timestamp
)(d) => d.index
tickFormat()
do this: tickFormat: (x, index) => formatAsMonth(data[index].timestamp)
EDIT: index
will be incorrect if numTicks
is modified (index is the index of the tick, not the datapoint), so will need to determine the datapoint index
with something like:
tickFormat: (x: number) => {
// workaround for https://github.com/f5/unovis/issues/450
if (format.startsWith('date')) {
const index = model.data.findIndex(d => d.index === x)
return formatValue(model.data[index].timestamp, format)
}
return formatValue(x, format)
},
This gets us over a hump, until hopefully a fix arrives:
Thank you, I did that after your original post suggestion. Much appreciated @davestewart !
Hello,
We're using timestamps as our Datum x-axis values, but it seems to result in misaligned x-axis labels:
Using indices, the labels line up perfectly:
Feels like a bug.
Is it?