Skip to content

[Bug] Y-axis does not scale properly for numbers <0.01 #783

@squidKid-deluxe

Description

@squidKid-deluxe

Version

9.6.0

Steps to Reproduce

I created a chart like this:

// Initialize new chart
chart = klinecharts.init('kline-container');

// Set style options
chart.setStyles({
    grid: {
        show: true,
        horizontal: {
            show: true,
            size: 1,
            color: '#EDEDED'
        },
        vertical: {
            show: true,
            size: 1,
            color: '#EDEDED'
        }
    }
});

return chart;

and then I used chart.applyNewData(candles); with valid OHLC candles that have prices in the 0.00000894 - 0.00001232 range (inverted BTC/USD price).

Current Behavior

Image

Does not automatically zoom in when plotted, and requires manual zooming through multiple orders of magnitude to view the data.

Expected Behavior

Image

(This is manually zoomed in, note that the values on the Y-axis are still zero rather than values like 0.00001232 or 1.23e-5)

Environment

- OS: Linux Mint 22.1
- Browser: Firefox
- Framework: Native JS

Any additional comments?

No response

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