Skip to content

Better schema declarations for array attributes that don't scale with coordinate arrays #1894

Closed
@etpinard

Description

@etpinard

See #1891 for context.

At the moment, axis.tickvals, axis.ticktext, axis.categoryarray, colorbar.tickvals and colorbar.ticktext are listed as valType: 'data_array'. This is causing issues for colorbar.tickvals and colorbar.ticktext as routines that use the output of PlotSchema.findArrayAttributes are expecting those data arrays to scale with the coordinate arrays.

So, as @alexcjohnson points out, maybe we should tag these uncorrelated data arrays in the schema (e.g. colorbar.tickvals would have uncorrelatedArray: true) - which would be a lot more robust than the solution in aa93123

But perhaps, we should make these attributes something else then valType: 'data_array' instead. For plotly.js, setting those attributes to valType: 'info_array' with freeLength: true would work, but that might break a few things downstream (e.g. the plotly workspace).

Somewhat related: we should also think about correlated arrays mean for trace with 2D coordinate arrays, so that we can eventually extend filter and sort transform to 2D data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions