Skip to content

Hmm, didn't knew about that. It does work, as in that it also zooms to this period. #471

@kurkle

Description

@kurkle

Somehow there looks to be a change to the onZoomComplete function.

In 1.0.0-beta.1 I have to use this (with curly brackets):

    onZoomComplete: function ({ chart }) {
        showHideZoomButton(chart);
    }

function showHideZoomButton(chart) {
	document.querySelector('.resetZoomButton').style.display = (chart.scales.x.options.min != 0 || chart.scales.x.options.max != 0 || chart.scales.y.options.min != 0 || chart.scales.y.options.max != 0) ? 'block' : 'none';
}

In 1.0.0-beta.2 I have to use this (without curly brackets):

    onZoomComplete: function (chart) {
        showHideZoomButton(chart);
    }

Is there any logic to this, or am I doing something wrong?

Originally posted by @KoalaBear84 in #464 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions