Add API to get chart values (data, markers, etc)
See original GitHub issueWhy is there no getPrice? or getMarkers();
Would really like them, makes it much easyer for me to use.
Example:
This is how I need to get the current price now:
let currentPrice = Array.from(Array.from(priceArea._dataUpdatesConsumer.de.ee)[priceArea._dataUpdatesConsumer.de.ee.size - 1][1].mapping)[0][1].value;
Just write getPrice(); would make it much more easyer and would have saved me at least 3 hours of searching.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:15 (6 by maintainers)
Top Results From Across the Web
API | Chart.js
Triggers an update of the chart. This can be safely called after updating the data object. This will update all scales, legends, and...
Read more >Excel.Chart class - Office Add-ins - Microsoft Learn
Represents a chart object in a workbook. To learn more about the chart object model, see Work with charts using the Excel JavaScript...
Read more >Google Visualization API Reference | Charts
Adds a new column to the data table, and returns the index of the new column. All the cells of the new column...
Read more >Charts — python-pptx 0.6.21 documentation - Read the Docs
python-pptx provides an API for adding and manipulating charts. ... The ValueAxis object providing access to properties of the value axis of this...
Read more >Insert Links into Google Charts api data? - Stack Overflow
Then when the select event occurs, I just retrieve the link from the original DataTable. <html> <head> <script type="text/javascript" ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://jsfiddle.net/nk0412pu/
Again, you should use
number
at series’ value,toFixed()
function returns astring
, obviously it’s not gonna work. If you really wanna round up your numbers, tryMath.round()
instead.No offence, but I think your major problem is with javascript, you don’t seem to understand the primitive types and having a lot of trouble writing your code in an efficient way. Thus, many of your issues might be caused by that instead of this library.
This is kind of off topic I assumed, yet I suggest you write in Typescript (which is a superset of javascript) to check these potential errors, since this library is written in Typescript the first place and it will very much improve your coding experience by providing better code completion and type checks.
Well, you basically did everything wrong in this part…
In your code,
2020-4-22
literally means2020 - 4 - 22 = 1994
, which is an integer and will be considered as an UNIX timestamp. And for the second marker,'2020-4-23'
should be'2020-04-23'
to follow the ISO format ofYYYY-MM-DD
.Docs of lightweight-charts might not be great, but definitely good enough to make things running.