Skip to content

Implement error bars on date axis #3722

@jonmmease

Description

@jonmmease

Originally reported in plotly/plotly.py#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':
newplot-7

with xaxis.type: 'date':
newplot-6

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogfeaturesomething new

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions