Skip to content

Giving stroke / border on one specific marker in Pie Chart #2989

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

Closed
rmdwirizki opened this issue Sep 10, 2018 · 3 comments
Closed

Giving stroke / border on one specific marker in Pie Chart #2989

rmdwirizki opened this issue Sep 10, 2018 · 3 comments
Assignees
Labels
bug something broken

Comments

@rmdwirizki
Copy link

I read the doc at https://plot.ly/javascript/reference/#pie, it is said that we can provide an array of number (stroke's width) to give on a specific marker in pie chart.
image
But if we provide an array in "width" field like this:

var data = [{
  values: [20, 26, 55],
  labels: ['Residential', 'Non-Residential', 'Utility'],
  type: 'pie',
  pull: [0.1, 0, 0],
  marker: {
    colors: ['rebeccapurple', 'purple', 'mediumpurple'],
    line: {
      // WORKS
      // width: 3
      // ERROR
      width: [3, 0, 0]
    }
  }
}];

Plotly.newPlot('myDiv', data);

It will produce such an error:
image

What i'm trying to achieve is something like this: (harcoded in inspection tools)
image

Codepen Link: https://codepen.io/rmdwirizki/pen/vzdNjp

@etpinard
Copy link
Contributor

Interesting. Array marker.line.width does seem to work in some case (e.g. in one of our test mock https://rreusser.github.io/plotly-mock-viewer/#pie_style_arrays), but not here.

Thanks very much for the report @rmdwirizki

@etpinard etpinard added the bug something broken label Sep 10, 2018
@etpinard
Copy link
Contributor

Ah and this was working in v1.31.0: https://codepen.io/etpinard/pen/YOeNer

@etpinard
Copy link
Contributor

PR #2117 is most likely the culprit.

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

No branches or pull requests

3 participants