Skip to content

Custom color scales with rgba values are broken #323

Closed
@tbreloff

Description

@tbreloff

Adjusting one of your examples:

var trace1 = {
  y: [5, 5, 5, 5],
  mode: 'markers',
  marker: {
    size: 40,
    colorscale: [[0,'rgb(255,0.0,0.0)'], [1,'rgba(0.0,0.0,255,0.5)']],
    color: [0, 1, 2, 3]
  }
};

var data = [trace1];

var layout = {
  title: 'Scatter Plot with a Color Dimension'
};

Plotly.newPlot('myDiv', data, layout);

The 2nd color of the colorscale is black if I try to use an rgba... why? Is there a way to get this functionality?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions