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.

data exceeds in volume bar chart

See original GitHub issue

capture something like that

here is my volume chart code.

<Chart id={2} origin={(w, h) => [0, h - 150]} height={200} yExtents={[d => d.volume, smaVolume20.accessor()]}>
    <YAxis axisAt="left" orient="left" ticks={5} tickFormat={format(".3s")}/>
    <MouseCoordinateY
        at="right"
        orient="right"
        displayFormat={format(".3s")} />
    <BarSeries yAccessor={d => d.volume} fill={(d) => d.close > d.open ? green[500] : red[500]} />
    <LineSeries yAccessor={smaVolume20.accessor()} stroke={smaVolume20.stroke()}/>
    <CurrentCoordinate yAccessor={smaVolume20.accessor()} fill={smaVolume20.stroke()} />
</Chart>

and my json data: 1

is it bug or my setting problem? thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
rragcommented, Nov 25, 2017

The problem was you were using string for volume, o, h, l, c. I changed volume to a number and it worked

https://codesandbox.io/s/x74j5z11po

                var obj = data[key];
                obj = {
                    open: obj["1. open"],
                    close: obj["4. close"],
                    high: obj["2. high"],
                    low: obj["3. low"],
-                   volume: obj["5. volume"],
+                   volume: +(obj["5. volume"]),
                    date: new Date(key)
                }
                return obj;
            });
0reactions
tmclouislukcommented, Nov 25, 2017

yeah Once I change the volume to number then it’s ok now really thank you so much!!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Volume - Barchart Trader
Volume. Volume can be a barometer of future activity and direction. Volume measures the number of contracts that exchanged hands during the trading...
Read more >
How to create volume bar charts - QuantShare
A new bar is created when the total volume of the current bar reaches or exceeds the volume threshold. You can create volume...
Read more >
Volume Bars - thinkorswim Learning Center
Volume bars are a representation of the transactions that have taken place on the best bid and ask. They are shown at the...
Read more >
Help topic 47: Number Of Trades, Volume or Range Bar ...
Number of Trades, Volume, Range, or Renko chart bars can split the underlying data records in an Intraday data file when those data...
Read more >
Understanding Volume Analysis in Day Trading - The Balance
Volume typically appears at the bottom of a stock price chart as vertical bars that represent how many shares changed hands over time....
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