Skip to content

width.bar doesnt show if width is typed array #3142

Closed
@Kully

Description

@Kully

re the python bug report here: plotly/plotly.py#1231

bar.width cannot be a typed array. In the codepen example, I used a Float64Array.

See this codepen: https://codepen.io/plotly/pen/KGGarx

var a = [0.1, 0.4, 0.7]

var myArray = a;
var myTypedArray = new Float64Array(a);

var trace1 = {
     type: 'bar',
     width: myArray,
     x: [1, 2, 3],
     xaxis: 'x1',
     y: [3, 2, 1]
}

var trace2 = {
     type: 'bar',
     width: myTypedArray,
     x: [1, 2, 3],
     xaxis: 'x2',
     y: [3, 2, 1]
}

var data = [trace1, trace2];

var layout = {
  xaxis1: {'domain': [0, 0.45]},
  xaxis2: {'domain': [0.55, 1]},
};

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

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