Skip to content

Y-axis changes to hoverformat value when both tickformat and hoverformat are set #7242

Open
@jrhessels

Description

@jrhessels

When using Plotly.js, if both tickformat and hoverformat are specified for the y-axis, the y-axis values unexpectedly change to the hoverformat values instead of displaying the tickformat values.

example code:

    yaxis2: {
        title: { text: 'Strip Widht [mm]' }, // Y-axis title
        titlefont: { color: '#004768', size: 8, standoff: 0.1 },
        tickfont: { color: '#004768', size: 8 },
        domain: [0.15, 0.80],
        linecolor: '#004768',
        // range based on strip width setpoint + tollerance + 10 mm extra
        range: [(tagValues[4] - tagValues[3] - 5), (tagValues[4] + tagValues[3] + 5)],
        tickvals: [(tagValues[4] - tagValues[3] - 3),(tagValues[4] - tagValues[3]), tagValues[4], (tagValues[4] + tagValues[3]), (tagValues[4] + tagValues[3] + 3)],
        hoverformat: '.2f',
        tickformat: '.0f',
        zeroline: false
    },

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogbugsomething broken

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions