Implement #3722 Add date type to work with error bars by mshvarts · Pull Request #7570 · plotly/plotly.js

@alexcjohnson Fair enough! If you're fine with that limitation it's fine with me as well.

@mshvarts Here's a mock showing the 4 different types of error bar specifications in combination with a date axis.

JSON:

Details
{
  "data": [
    {
      "name": "percent",
      "x": ["2025-11-05", "2025-11-06", "2025-11-07"],
      "y": [10, 12, 11],
      "error_x": {
        "type": "percent",
        "value": 0.001
      },
      "type": "scatter"
    },
    {
      "name": "constant",
      "x": ["2025-11-05", "2025-11-06", "2025-11-07"],
      "y": [7, 9, 8],
      "error_x": {
        "type": "constant",
        "value": 10800000
      },
      "type": "scatter"
    },
    {
      "name": "sqrt",
      "x": ["2025-11-05", "2025-11-06", "2025-11-07"],
      "y": [4, 6, 5],
      "error_x": {
        "type": "sqrt"
      },
      "type": "scatter"
    },
    {
      "name": "data",
      "x": ["2025-11-05", "2025-11-06", "2025-11-07"],
      "y": [1, 3, 2],
      "error_x": {
        "type": "data",
        "array": [7200000, 14400000, 21600000]
      },
      "type": "scatter"
    }
  ],
  "layout": {
    "title": {
      "text": "Error bars along date axis"
    }
  }
}

Plot image:
Screenshot 2025-11-05 at 2 41 54 PM

@alexcjohnson It seems to me that both the sqrt type and percent type are not relevant for dates since the zero point is arbitrary, do you agree? And in that case should we explicitly disallow those types for dates, or allow them to exist even though they are not meaningful?