You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: python/bullet-charts.md
+43-43Lines changed: 43 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -38,17 +38,17 @@ jupyter:
38
38
---
39
39
40
40
#### Basic Bullet Charts
41
-
Stephen Few's Bullet Chart was invented to replace dashboard [gauges](https://plot.ly/javascript/gauge-charts/) and meters, combining both types of charts into simple bar charts with qualitative bars (steps), quantitative bar (bar) and performance line (threshold); all into one simple layout.
42
-
Steps typically are broken into several values, which are defined with an array. The bar represent the actual value that a particular variable reached, and the threshold usually indicate a goal point relative to the value achieved by the bar. See [indicator page](https://plot.ly/javascript/gauge-charts/) for more detail.
41
+
Stephen Few's Bullet Chart was invented to replace dashboard [gauges](https://plot.ly/python/gauge-charts/) and meters, combining both types of charts into simple bar charts with qualitative bars (steps), quantitative bar (bar) and performance line (threshold); all into one simple layout.
42
+
Steps typically are broken into several values, which are defined with an array. The bar represent the actual value that a particular variable reached, and the threshold usually indicate a goal point relative to the value achieved by the bar. See [indicator page](https://plot.ly/python/gauge-charts/) for more detail.
43
43
44
44
```python
45
45
import plotly.graph_objects as go
46
46
47
47
fig = go.Figure(go.Indicator(
48
-
mode="number+gauge+delta",
49
-
gauge= {'shape': "bullet"},
48
+
mode="number+gauge+delta",
49
+
gauge= {'shape': "bullet"},
50
50
value=220,
51
-
delta= {'reference': 300},
51
+
delta= {'reference': 300},
52
52
domain= {'x': [0, 1], 'y': [0, 1]},
53
53
title= {'text': "Profit"}))
54
54
fig.update_layout(height=250)
@@ -64,41 +64,41 @@ import plotly.graph_objects as go
64
64
65
65
fig = go.Figure(go.Indicator(
66
66
mode="number+gauge+delta", value=220,
67
-
domain= {'x': [0.1, 1], 'y': [0, 1]},
67
+
domain= {'x': [0.1, 1], 'y': [0, 1]},
68
68
title= {'text' :"<b>Profit</b>"},
69
-
delta= {'reference': 200},
69
+
delta= {'reference': 200},
70
70
gauge= {
71
-
'shape': "bullet",
72
-
'axis': {'range': [None, 300]},
71
+
'shape': "bullet",
72
+
'axis': {'range': [None, 300]},
73
73
'threshold': {
74
-
'line': {'color': "red", 'width': 2},
75
-
'thickness': 0.75,
74
+
'line': {'color': "red", 'width': 2},
75
+
'thickness': 0.75,
76
76
'value': 280},
77
77
'steps': [
78
-
{'range': [0, 150], 'color': "lightgray"},
78
+
{'range': [0, 150], 'color': "lightgray"},
79
79
{'range': [150, 250], 'color': "gray"}]}))
80
80
fig.update_layout(height=250)
81
81
fig.show()
82
82
```
83
83
84
84
#### Custom Bullet
85
-
The following example shows how to customize your charts. For more information about all possible options check our [reference page](https://plot.ly/javascript/reference/#indicator).
85
+
The following example shows how to customize your charts. For more information about all possible options check our [reference page](https://plot.ly/python/reference/#indicator).
Copy file name to clipboardExpand all lines: python/gauge-charts.md
+22-22Lines changed: 22 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -45,15 +45,15 @@ A radial gauge chart has a circular arc, which displays a single value to estima
45
45
The bar shows the target value, and the shading represents the progress toward that goal. Gauge charts, known as
46
46
speedometer charts as well. This chart type is usually used to illustrate key business indicators.
47
47
48
-
The example below displays a basic gauge chart with default attributes. For more information about different added attributes check [indicator](https://plot.ly/javascript/indicator/) tutorial.
48
+
The example below displays a basic gauge chart with default attributes. For more information about different added attributes check [indicator](https://plot.ly/python/indicator/) tutorial.
49
49
50
50
```python
51
51
import plotly.graph_objects as go
52
52
53
53
fig = go.Figure(go.Indicator(
54
-
mode="gauge+number",
55
-
value=270,
56
-
domain= {'x': [0, 1], 'y': [0, 1]},
54
+
mode="gauge+number",
55
+
value=270,
56
+
domain= {'x': [0, 1], 'y': [0, 1]},
57
57
title= {'text': "Speed"}))
58
58
59
59
fig.show()
@@ -67,44 +67,44 @@ The following examples include "steps" attribute shown as shading inside the rad
The following example shows how to style your gauge charts. For more information about all possible options check our [reference page](https://plot.ly/javascript/reference/#indicator).
85
+
The following example shows how to style your gauge charts. For more information about all possible options check our [reference page](https://plot.ly/python/reference/#indicator).
Copy file name to clipboardExpand all lines: python/indicator.md
+33-33Lines changed: 33 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -67,41 +67,41 @@ In this tutorial we introduce a new trace named "Indicator". The purpose of "ind
67
67
<li> position: position relative to `number` (either top, left, bottom, right)</li>
68
68
</ol>
69
69
Finally, we can have a simple title for the indicator via `title` with 'text' attribute which is a string, and 'align' which can be set to left, center, and right.
70
-
There are two gauge types: [angular](https://plot.ly/javascript/gauge-charts/) and [bullet](https://plot.ly/javascript/bullet-charts/). Here is a combination of both shapes (angular, bullet), and different modes (guage, delta, and value):
70
+
There are two gauge types: [angular](https://plot.ly/python/gauge-charts/) and [bullet](https://plot.ly/python/bullet-charts/). Here is a combination of both shapes (angular, bullet), and different modes (guage, delta, and value):
Another interesting feature is that indicator trace sits above the other traces (even the 3d ones). This way, it can be easily used as an overlay as demonstrated below
144
144
145
145
```python
146
-
import plotly.graph_objects as go
146
+
import plotly.graph_objects as go
147
147
148
148
fig = go.Figure(go.Indicator(
149
-
mode="number+delta",
149
+
mode="number+delta",
150
150
value=492,
151
151
delta= {"reference": 512, "valueformat": ".0f"},
152
152
title= {"text": "Users online"},
@@ -166,9 +166,9 @@ import plotly.graph_objects as go
166
166
167
167
fig = go.Figure(go.Indicator(
168
168
mode="number+delta",
169
-
value=400,
169
+
value=400,
170
170
number= {'prefix': "$"},
171
-
delta= {'position': "top", 'reference': 320},
171
+
delta= {'position': "top", 'reference': 320},
172
172
domain= {'x': [0, 1], 'y': [0, 1]}))
173
173
174
174
fig.update_layout(paper_bgcolor="lightgray")
@@ -184,22 +184,22 @@ import plotly.graph_objects as go
0 commit comments