Skip to content

scattergeo does not respect datum position in arrayOk attributes #1529

Closed
@etpinard

Description

@etpinard

For example

Plotly.plot('graph', [{
  type: 'scattergeo',
  lon: [10, null, 40],
  lat: [0, null, 0],
  marker: {
    color: ['red', 'green', 'blue'],
    size: [20, 50, 10]
  }
}])

yields

image

see http://codepen.io/etpinard/pen/QpJGeq


This issues comes from #1004 where we started skipping over items with non-numeric lon and/or lat coordinates.

Post #1519 (comment), I'm having second thoughts about skipping non-numeric items in the calc step though mapbox/calc.js appears to get this right. Ignoring non-numeric items early makes sense for 🐎 as we save a few isNumeric call in hot code paths (e.g. in <>/plot.js), but it does lead to some headaches elsewhere in the code (e.g. those placeholder flags) 😕

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions