pablrod / p5-Chart-Plotly

Generate html/javascript charts with perl data using javascript library Plotly.js
MIT License
9 stars 4 forks source link

Allow Scattergeo's marker to accept arrays of Chart::Plotly::Trace::Attribute::Marker #4

Closed weatherwax closed 7 years ago

weatherwax commented 7 years ago

I have noticed it is not possible to pass an array of markers to the Scattergeo plot. It is allowed to pass a hashref, marker => { size => \@sizes, color => \@colors } with arrays of properties, but then (unless I have missed something) you can't use Chart::Plotly::Trace::Attribute::Marker

pablrod commented 7 years ago

Yes, it's a bug. I thought that marker was equal for all traces, but it can be different so It's necessary to drop Chart::Plotly::Trace::Attribute::Marker and create new Chart::Plotly::Trace::Scattergeo::Attribute::Marker and so on. (The same for all Chart::Plotly::Trace::Attribute::*)

Meanwhile I'm going to patch Scattergeo to accept also array of markers.

pablrod commented 7 years ago

Patched!: https://github.com/pablrod/p5-Chart-Plotly/commit/9d164cfccc9fa8c0b2233e630035b96871d37bc7

weatherwax commented 7 years ago

Great, thanks!