Skip to content

Add support for fast image rendering on any linear axes #5305

Closed
@antoinerg

Description

@antoinerg

At the moment, image trace will only get fast rendering if axes are compatible as per:

var fastImage = supportsPixelatedImage && !trace._hasZ && trace._hasSource && compatibleAxis(xa) && compatibleAxis(ya);

However, compatibleAxis here is a bit too strict since there's no reason we couldn't support both reversed and normal linear axes:

function compatibleAxis(ax) {
return ax.type === 'linear' &&
// y axis must be reversed but x axis mustn't be
((ax.range[1] > ax.range[0]) === (ax._id.charAt(0) === 'x'));
}

Basically, we should 🔪 line 21 and then proceed to get the positioning right as well as the correct hover labels for any order of the axes 😸

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething brokenfeaturesomething new

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions