Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Price on horzGrid start dissapearing on precision >= 10 #841

Closed
SuperPenguin opened this issue Sep 9, 2021 · 0 comments · Fixed by #880
Closed

Price on horzGrid start dissapearing on precision >= 10 #841

SuperPenguin opened this issue Sep 9, 2021 · 0 comments · Fixed by #880
Assignees
Labels
bug Unexpected problem or unintended behavior.
Milestone

Comments

@SuperPenguin
Copy link
Contributor

Lightweight Charts Version: 3.5.0

Steps/code to reproduce:

import { BarData, createChart } from "lightweight-charts";

const chartRoot = document.getElementById("main-chart") as HTMLDivElement;
const chart = createChart(chartRoot, {
  width: 800,
  height: 600
});

const precision = 10;

const candlestick = chart.addCandlestickSeries({
  priceFormat: {
    type: "price",
    minMove: Math.pow(10, -precision),
    precision: precision
  }
});

const barData: BarData[] = [
  {
    time: "2021-09-09",
    open: Math.pow(10, -precision),
    high: Math.pow(10, -precision),
    low: Math.pow(10, -precision),
    close: Math.pow(10, -precision)
  }
];

candlestick.setData(barData);

Actual behavior:

price axis dissapear

Expected behavior:

price shouldn't dissapear

Screenshots:

This on precision 10
image

This on precision 9
image

CodeSandbox/JSFiddle/etc link:

@timocov timocov added the needs investigation Needs further investigation. label Sep 15, 2021
@timocov timocov added this to the 3.7 milestone Sep 15, 2021
@timocov timocov added bug Unexpected problem or unintended behavior. and removed needs investigation Needs further investigation. labels Nov 3, 2021
@timocov timocov self-assigned this Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants