question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Price scale not displayed if first value is undefined

See original GitHub issue

Lightweight Charts Version: 3.7.0

Steps/code to reproduce: Display a chart with a dataset where the first value is missing.

[
    [ "2015", undefined ],
    [ "2016", "117000" ],
    [ "2018", "130000" ],
    [ "2019", "146100" ],
    [ "2020", "172900" ],
    [ "2021", "193900" ]
]

Actual behavior: The price scale for this series is not shown.

Expected behavior: The price scale for this series should try to pull axis information from the first-available value…and ultimately, should show the Y axis price scale.

Screenshots: Screen Shot 2022-02-15 at 19 16 20

CodeSandbox/JSFiddle/etc link: (none)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
timocovcommented, Feb 16, 2022

From the first observation on your data:

  • the library doesn’t support this format of the data (like on your screenshot) so most likely this is not what you provide to the library (probably you have a post-processing of this result)
  • the library doesn’t accept undefined as a value for data. if you want to create a whitespace you need to omit value property
  • values MUST BE numbers, not strings

Probably it helps.

1reaction
timocovcommented, Feb 16, 2022

Please create a repro for your issue on jsfiddle for example.

Read more comments on GitHub >

github_iconTop Results From Across the Web

PHP - Undefined variable when sub total the price - Shopping ...
I am trying to get the total price of all items after added them into bucket but i am having undefined variable error...
Read more >
Uncaught TypeError: Cannot read property of undefined
After I assign a value to a, the function will return me the value of t, mapped by a=10.
Read more >
Undefined vs Null - Javascript - Flexiple
In JavaScript there are two special types of values - undefined and null. Let's find out the differences between undefined and null.
Read more >
Line Chart - Chart.js
Often, it is used to show trend data, or the comparison of two data sets. ... All these values, if undefined , fallback...
Read more >
Report templates—ArcGIS Survey123 | Documentation
The Survey123 Report tool allows you to design your own personalized templates and produce multiple reports at once.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found