Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Kully opened this issue Oct 23, 2018 · 1 comment · Fixed by #3169
Closed

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

Kully opened this issue Oct 23, 2018 · 1 comment · Fixed by #3169
Labels
bug something broken

Comments

@Kully
Copy link
Contributor

Kully commented Oct 23, 2018

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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants