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.

Rangebreak not working

See original GitHub issue

My range break doesn’t seem to work. I am following the documentation here: https://plotly.com/javascript/reference/#layout.

<div>
            <Plot
                data={[
                    {
                        x: data['dates'],
                        y: data['open_price'],
                        type: 'scatter'
                    }
                ]}


                layout={{
                    autosize: false,
                    width: 1500,
                    height: 700,

                    xaxis: {
                        color: 'red',
                        rangebreaks: {
                            bounds: ["sat", "mon"],
                            values: ["2015-12-25"],
                            bounds: [17, 9], pattern: "hour"
                        }
                    }
                }

                }

            />
        </div>
image

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
allenye66commented, Apr 19, 2022

@alexcjohnson Thank you so much! It is working now.

0reactions
alexcjohnsoncommented, Apr 19, 2022

Ah sorry, I missed that in your code - this is why rangebreaks is a list, because each pattern you want to exclude needs to be a separate object:

                    xaxis: {
                        color: 'red',
                        rangebreaks: [
                            {bounds: ["sat", "mon"]},
                            {values: ["2015-12-25"]},
                            {bounds: [17, 9], pattern: "hour"}
                        }]
                    }

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Problems using Rangebreaks plotly - Stack Overflow
I was making a time series graph using Plotly however the x-axis has too many labels. I did some research and I think...
Read more >
rangebreaks does not work · Issue #2555 · plotly/plotly.py
I am using plotly 4.6. Why does it not work? Here the example: import plotly.express as px import pandas as pd df ...
Read more >
Rangebreaks not working in domains - Plotly Python
In the following code: import pandas as pd import numpy as np import plotly.graph_objects as go days = 50 date = pd.date_range('20210101', ...
Read more >
Opening Range Break Trading Pattern I Technical Analysis
SUBSCRIBE! https://www.youtube.com/mattdiamond #daytrading #options #stocks ______ DISCLAIMER: I am not a licensed financial professional.
Read more >
COMPLETE opening range break trading guide - YouTube
An options and stock trading strategy that actually works from a guy who isn't in it for the money.
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