plottable icon indicating copy to clipboard operation
plottable copied to clipboard

Line chart entity selection is `undefined`

Open sixinli opened this issue 7 years ago • 1 comments

it seems like line chart is composed of 2 entity, and after upgrading to plottable 3.x we realized that the second entity selection object is kind of broken: entity.selection._groups[0][0] is undefined

this is probably caused by getVisualPrimitives() https://github.com/palantir/plottable/blob/develop/src/drawers/drawer.ts#L99 only returns [Path] (size of 1) and when we convert entity to plottable entity we index into the visual primitives array with the entity index (entity is size of 2) screen shot 2017-05-24 at 3 11 30 pm

https://github.com/palantir/plottable/blob/dce44f17ecdec81a1598bee7bf9884a08a0acd36/src/plots/plot.ts#L746 (first introduce in https://github.com/palantir/plottable/pull/3304)

for more detail: selection for entity 1 for a line: screen shot 2017-05-24 at 3 09 29 pm

selection for entity 2 for a line: screen shot 2017-05-24 at 3 20 36 pm

not sure what the previous state was...

sixinli avatar May 24 '17 19:05 sixinli

Spoke offline, the root cause is that line drawer is returning empty selections. This is probably because Line constructs only one visual primitive per dataset, but goes through the "one visual primitive per data point" code path

hellochar avatar Jun 07 '17 19:06 hellochar