li-nguyen commited on
Commit
e41c0e1
·
1 Parent(s): 97b6fec

Bring over latest changes

Browse files
README.md CHANGED
@@ -13,14 +13,11 @@ short_description: Vizro - Visual vocabulary
13
 
14
  ### Welcome to our visual vocabulary dashboard! 🎨
15
 
16
- This dashboard serves as a comprehensive guide for selecting and creating various types of charts. It helps you decide
17
- when to use each chart type, and offers sample Python code using [Plotly](https://plotly.com/python/), and
18
- instructions for embedding these charts into a [Vizro](https://github.com/mckinsey/vizro) dashboard.
19
 
20
  The charts in this dashboard are designed to make it easy for anyone to create beautiful and sophisticated visuals.
21
 
22
- Our goal is to help you understand best practices in data visualization, ensure your charts effectively communicate
23
- your message, and streamline the creation of high-quality, interactive visualizations.
24
 
25
  Created by:
26
 
@@ -30,12 +27,9 @@ Created by:
30
 
31
  Inspired by:
32
 
33
- - [The FT Visual Vocabulary](https://github.com/Financial-Times/chart-doctor/blob/main/visual-vocabulary/README.md):
34
- [Alan Smith](https://github.com/alansmithy), [Chris Campbell](https://github.com/digitalcampbell), Ian Bott,
35
- Liz Faunce, Graham Parrish, Billy Ehrenberg, Paul McCallum, [Martin Stabe](https://github.com/martinstabe).
36
 
37
- - [The Graphic Continuum](https://www.informationisbeautifulawards.com/showcase/611-the-graphic-continuum):
38
- Jon Swabish and Severino Ribecca
39
 
40
  Credits and sources:
41
 
@@ -113,13 +107,12 @@ The dashboard is still in development. Below is an overview of the chart types f
113
  Contributions are welcome! To contribute a chart, follow the steps below:
114
 
115
  1. Check that a `svg` file named after the chart type is contained in the [assets](https://github.com/mckinsey/vizro/tree/main/vizro-core/examples/visual-vocabulary/assets/images/charts) folder. If not, [raise an issue](https://github.com/mckinsey/vizro/issues) in the repository.
116
- 2. Add a `.py` file containing a code example of the chart type in the `pages/examples` folder, for instance, `area.py`. Take a look at existing examples.
117
- 3. Create a new page for the chart type and add it to the relevant category `.py` file such as `correlation.py`,
118
- `deviation.py`, `distribution.py`, etc. Ensure you add the page to the list of `pages` at the end of the `.py` file.
119
- 4. Remove the `IncompletePage(..)` entry for that chart type in `chart_groups.py`.
120
- 5. Update this `README.md` with the new chart type, its status, category, and API links.
121
 
122
  ## How to run the example locally
123
 
124
  1. Run the example with the command `hatch run example visual-vocabulary`.
125
- 2. You should now be able to access the app locally via http://127.0.0.1:8051/.
 
13
 
14
  ### Welcome to our visual vocabulary dashboard! 🎨
15
 
16
+ This dashboard serves as a comprehensive guide for selecting and creating various types of charts. It helps you decide when to use each chart type, and offers sample Python code using [Plotly](https://plotly.com/python/), and instructions for embedding these charts into a [Vizro](https://github.com/mckinsey/vizro) dashboard.
 
 
17
 
18
  The charts in this dashboard are designed to make it easy for anyone to create beautiful and sophisticated visuals.
19
 
20
+ Our goal is to help you understand best practices in data visualization, ensure your charts effectively communicate your message, and streamline the creation of high-quality, interactive visualizations.
 
21
 
22
  Created by:
23
 
 
27
 
28
  Inspired by:
29
 
30
+ - [The FT Visual Vocabulary](https://github.com/Financial-Times/chart-doctor/blob/main/visual-vocabulary/README.md): [Alan Smith](https://github.com/alansmithy), [Chris Campbell](https://github.com/digitalcampbell), Ian Bott, Liz Faunce, Graham Parrish, Billy Ehrenberg, Paul McCallum, [Martin Stabe](https://github.com/martinstabe).
 
 
31
 
32
+ - [The Graphic Continuum](https://www.informationisbeautifulawards.com/showcase/611-the-graphic-continuum): Jon Swabish and Severino Ribecca
 
33
 
34
  Credits and sources:
35
 
 
107
  Contributions are welcome! To contribute a chart, follow the steps below:
108
 
109
  1. Check that a `svg` file named after the chart type is contained in the [assets](https://github.com/mckinsey/vizro/tree/main/vizro-core/examples/visual-vocabulary/assets/images/charts) folder. If not, [raise an issue](https://github.com/mckinsey/vizro/issues) in the repository.
110
+ 1. Add a `.py` file containing a code example of the chart type in the `pages/examples` folder, for instance, `area.py`. Take a look at existing examples.
111
+ 1. Create a new page for the chart type and add it to the relevant category `.py` file such as `correlation.py`, `deviation.py`, `distribution.py`, etc. Ensure you add the page to the list of `pages` at the end of the `.py` file.
112
+ 1. Remove the `IncompletePage(..)` entry for that chart type in `chart_groups.py`.
113
+ 1. Update this `README.md` with the new chart type, its status, category, and API links.
 
114
 
115
  ## How to run the example locally
116
 
117
  1. Run the example with the command `hatch run example visual-vocabulary`.
118
+ 1. You should now be able to access the app locally via http://127.0.0.1:8051/.
assets/css/custom.css CHANGED
@@ -94,7 +94,7 @@ img[src*="#chart-icon"] {
94
  background: var(--text-primary);
95
  border-top-left-radius: 8px;
96
  bottom: 0;
97
- color: var(--text-primary-inverted);
98
  display: flex;
99
  font-size: 0.8rem;
100
  font-weight: 500;
 
94
  background: var(--text-primary);
95
  border-top-left-radius: 8px;
96
  bottom: 0;
97
+ color: var(--text-primary-inverted) !important;
98
  display: flex;
99
  font-size: 0.8rem;
100
  font-weight: 500;
custom_components.py CHANGED
@@ -1,17 +1,12 @@
1
  """Contains custom components used inside the dashboard."""
2
 
3
  from typing import Literal
 
4
 
5
  import dash_bootstrap_components as dbc
6
  import vizro.models as vm
7
  from dash import dcc, html
8
-
9
- try:
10
- from pydantic.v1 import Field
11
- except ImportError: # pragma: no cov
12
- from pydantic import Field
13
-
14
- from urllib.parse import quote
15
 
16
 
17
  class CodeClipboard(vm.VizroBaseModel):
 
1
  """Contains custom components used inside the dashboard."""
2
 
3
  from typing import Literal
4
+ from urllib.parse import quote
5
 
6
  import dash_bootstrap_components as dbc
7
  import vizro.models as vm
8
  from dash import dcc, html
9
+ from pydantic import Field
 
 
 
 
 
 
10
 
11
 
12
  class CodeClipboard(vm.VizroBaseModel):
requirements.in CHANGED
@@ -2,6 +2,6 @@
2
  autoflake==2.3.1
3
  black==24.4.2
4
  isort==5.13.2
5
- plotly==5.24.1
6
  vizro==0.1.28
7
  gunicorn
 
2
  autoflake==2.3.1
3
  black==24.4.2
4
  isort==5.13.2
5
+ plotly==6.0.0
6
  vizro==0.1.28
7
  gunicorn
requirements.txt CHANGED
@@ -50,9 +50,7 @@ gunicorn==23.0.0
50
  idna==3.10
51
  # via requests
52
  importlib-metadata==8.5.0
53
- # via
54
- # dash
55
- # flask
56
  isort==5.13.2
57
  # via -r requirements.in
58
  itsdangerous==2.2.0
@@ -65,6 +63,8 @@ markupsafe==3.0.2
65
  # werkzeug
66
  mypy-extensions==1.0.0
67
  # via black
 
 
68
  nest-asyncio==1.6.0
69
  # via dash
70
  numpy==2.0.2
@@ -80,7 +80,7 @@ pathspec==0.12.1
80
  # via black
81
  platformdirs==4.2.2
82
  # via black
83
- plotly==5.24.1
84
  # via
85
  # -r requirements.in
86
  # dash
@@ -105,15 +105,8 @@ six==1.16.0
105
  # via
106
  # python-dateutil
107
  # retrying
108
- tenacity==9.0.0
109
- # via plotly
110
- tomli==2.1.0
111
- # via
112
- # autoflake
113
- # black
114
  typing-extensions==4.12.2
115
  # via
116
- # black
117
  # dash
118
  # pydantic
119
  # pydantic-core
 
50
  idna==3.10
51
  # via requests
52
  importlib-metadata==8.5.0
53
+ # via dash
 
 
54
  isort==5.13.2
55
  # via -r requirements.in
56
  itsdangerous==2.2.0
 
63
  # werkzeug
64
  mypy-extensions==1.0.0
65
  # via black
66
+ narwhals==1.25.0
67
+ # via plotly
68
  nest-asyncio==1.6.0
69
  # via dash
70
  numpy==2.0.2
 
80
  # via black
81
  platformdirs==4.2.2
82
  # via black
83
+ plotly==6.0.0
84
  # via
85
  # -r requirements.in
86
  # dash
 
105
  # via
106
  # python-dateutil
107
  # retrying
 
 
 
 
 
 
108
  typing-extensions==4.12.2
109
  # via
 
110
  # dash
111
  # pydantic
112
  # pydantic-core