Implement error bars on date axis
Originally reported in https://github.com/plotly/plotly.py/issues/1488
Here's an example that specifies error_x and flips between setting the xaxis.type property between 'date' and 'linear'.
CodePen: https://codepen.io/jonmmease/pen/zXrmOK
var fig = {
"data": [
{
"error_x": {
"array": [
100000.0,
100000.0,
100000.0
],
"type": "data",
"visible": true
},
"type": "scatter",
"x": [
1554370371547.085,
1554370471547.085,
1554370571547.085
],
"y": [
6,
10,
2
]
}
],
"layout": {
"xaxis": {
"type": "linear"
// "type": "date"
}
}
}
Plotly.newPlot('myDiv', fig, {showSendToCloud: true});
with xaxis.type: 'linear':

with xaxis.type: 'date':

Looks like we never implemented error bars on date axes:
https://github.com/plotly/plotly.js/blob/07822743b03e9bc1a3decd429c02b0452af49732/src/components/errorbars/calc.js#L37
still nothing? need it very much for lightcurves :(
Any updates on this? Workarounds? I just got a graph I am supposed to make that uses error bars on dates. I guess I can simply draw lines as a separate plot (if there is a way to keep it out of the legend?), but that seems kludgy...
@ibrewster I think I eventually got around this using a gantt chart style plot, FYI. I think it's a kinda odd use case. Unsure if that will work for the generic case but hope that helps.
Chiming in that this would also be useful when charting user-recorded data points, we have a lot of uncertainty about when exactly events happened and want to show error bars
Do I understand correctly that when this bug is fixed, it will work in python plotly also?
yes, but I expect it will be some time before it gets to the head of our queue :-/
Dang I just spend hours trying to figure out why it wasn't working by trying to debug the minified source code just to find this thread that it has never been implemented with dates 💀. At least I didn't spend even longer than that . But now what.. Do I need to implement this myself?
I would suggest to everyone who looks at this thread in the future to just use the gant chart functions.
-Tomasz
On Fri, Oct 3, 2025, 10:41 AM Max @.***> wrote:
mshvarts left a comment (plotly/plotly.js#3722) https://github.com/plotly/plotly.js/issues/3722#issuecomment-3366625027
Dang I just spend 3 hours trying to figure out why by trying to debug and decipher minified source code just to find that it has never been implemented with dates 💀 wow. At least I didn't spend even longer than that
— Reply to this email directly, view it on GitHub https://github.com/plotly/plotly.js/issues/3722#issuecomment-3366625027, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJY7LEAYMTVZRQ6QCZPUFUL3V2YLPAVCNFSM6AAAAACIHJDKJKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNRWGYZDKMBSG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>