Skip to content

Commit ab21dd0

Browse files
committed
Tidying up README.md
1 parent e3f5a0f commit ab21dd0

File tree

1 file changed

+23
-28
lines changed

1 file changed

+23
-28
lines changed

README.md

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,20 @@ Plotly.js can be used to produce dozens of chart types and visualizations, inclu
2222
</a>
2323
</div>
2424

25+
## Table of Contents
2526

26-
## Table of contents
27-
28-
* [Load as a node module](#load-as-a-node-module)
29-
* [Load via script tag](#load-via-script-tag)
27+
* [Load as a Node Module](#load-as-a-node-module)
28+
* [Load via Script Tag](#load-via-script-tag)
3029
* [Bundles](#bundles)
31-
* [Alternative ways to load and build plotly.js](#alternative-ways-to-load-and-build-plotlyjs)
3230
* [Documentation](#documentation)
33-
* [Bugs and feature requests](#bugs-and-feature-requests)
31+
* [Bugs and Feature Requests](#bugs-and-feature-requests)
3432
* [Contributing](#contributing)
35-
* [Notable contributors](#notable-contributors)
33+
* [Notable Contributors](#notable-contributors)
3634
* [Copyright and license](#copyright-and-license)
3735
* [Community](#community)
3836

39-
---
40-
## Load as a node module
37+
## Load as a Node Module
38+
4139
Install [a ready-to-use distributed bundle](https://github.com/plotly/plotly.js/blob/master/dist/README.md)
4240
```sh
4341
npm i --save plotly.js-dist-min
@@ -54,10 +52,10 @@ var Plotly = require('plotly.js-dist-min')
5452

5553
You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plotly.js-dist) if you prefer using an unminified package.
5654

57-
---
58-
## Load via script tag
55+
## Load via Script Tag
56+
57+
### The `script` HTML Element
5958

60-
### The script HTML element
6159
> In the examples below `Plotly` object is added to the window scope by `script`. The `newPlot` method is then used to draw an interactive figure as described by `data` and `layout` into the desired `div` here named `gd`. As demonstrated in the example above basic knowledge of `html` and [JSON](https://en.wikipedia.org/wiki/JSON) syntax is enough to get started i.e. with/without JavaScript! To learn and build more with plotly.js please visit [plotly.js documentation](https://plotly.com/javascript).
6260
6361
```html
@@ -77,6 +75,7 @@ You may also consider using [`plotly.js-dist`](https://www.npmjs.com/package/plo
7775
```
7876

7977
Alternatively you may consider using [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) in the script tag.
78+
8079
```html
8180
<script type="module">
8281
import "https://cdn.plot.ly/plotly-3.1.0.min.js"
@@ -87,15 +86,19 @@ Alternatively you may consider using [native ES6 import](https://developer.mozil
8786
Fastly supports Plotly.js with free CDN service. Read more at <https://www.fastly.com/open-source>.
8887

8988
### Un-minified versions are also available on CDN
89+
9090
While non-minified source files may contain characters outside UTF-8, it is recommended that you specify the `charset` when loading those bundles.
91+
9192
```html
9293
<script src="https://cdn.plot.ly/plotly-3.1.0.js" charset="utf-8"></script>
9394
```
9495

9596
> Please note that as of v2 the "plotly-latest" outputs (e.g. https://cdn.plot.ly/plotly-latest.min.js) will no longer be updated on the CDN, and will stay at the last v1 patch v1.58.5. Therefore, to use the CDN with plotly.js v2 and higher, you must specify an exact plotly.js version.
9697
9798
### MathJax
99+
98100
You could load either version two or version three of MathJax files, for example:
101+
99102
```html
100103
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_SVG.js"></script>
101104
```
@@ -108,40 +111,36 @@ You could load either version two or version three of MathJax files, for example
108111
Please refer to `devtools/test_dashboard/index-mathjax3chtml.html` to see an example.
109112

110113
### Need to have several WebGL graphs on a page?
114+
111115
You may simply load [virtual-webgl](https://github.com/greggman/virtual-webgl) script for WebGL 1 (not WebGL 2) before loading other scripts.
116+
112117
```html
113118
<script src="https://unpkg.com/[email protected]/src/virtual-webgl.js"></script>
114119
```
115120

116121
## Bundles
122+
117123
There are two kinds of plotly.js bundles:
124+
118125
1. Complete and partial official bundles that are distributed to `npm` and the `CDN`, described in [the dist README](https://github.com/plotly/plotly.js/blob/master/dist/README.md).
119126
2. Custom bundles you can create yourself to optimize the size of bundle depending on your needs. Please visit [CUSTOM_BUNDLE](https://github.com/plotly/plotly.js/blob/master/CUSTOM_BUNDLE.md) for more information.
120127

121-
---
122-
## Alternative ways to load and build plotly.js
123-
If your library needs to bundle or directly load [plotly.js/lib/index.js](https://github.com/plotly/plotly.js/blob/master/lib/index.js) or parts of its modules similar to [index-basic](https://github.com/plotly/plotly.js/blob/master/lib/index-basic.js) in some other way than via an official or a custom bundle, or in case you want to tweak the default build configurations, then please visit [`BUILDING.md`](https://github.com/plotly/plotly.js/blob/master/BUILDING.md).
124-
125-
---
126128
## Documentation
127129

128130
Official plotly.js documentation is hosted at [https://plotly.com/javascript](https://plotly.com/javascript).
129131

130132
These pages are generated by the Plotly [graphing-library-docs repo](https://github.com/plotly/graphing-library-docs) built with [Jekyll](https://jekyllrb.com/) and publicly hosted on GitHub Pages.
131133
For more info about contributing to Plotly documentation, please read through [contributing guidelines](https://github.com/plotly/graphing-library-docs/blob/master/README.md).
132134

133-
---
134-
## Bugs and feature requests
135+
## Bugs and Feature Requests
135136

136137
Have a bug or a feature request? Please [open a Github issue](https://github.com/plotly/plotly.js/issues/new) keeping in mind the [issue guidelines](https://github.com/plotly/plotly.js/blob/master/.github/ISSUE_TEMPLATE.md). You may also want to read about [how changes get made to Plotly.js](https://github.com/plotly/plotly.js/blob/master/CONTRIBUTING.md)
137138

138-
---
139139
## Contributing
140140

141141
Please read through our [contributing guidelines](https://github.com/plotly/plotly.js/blob/master/CONTRIBUTING.md). Included are directions for opening issues, using plotly.js in your project and notes on development.
142142

143-
---
144-
## Notable contributors
143+
## Notable Contributors
145144

146145
Plotly.js is at the core of a large and dynamic ecosystem with many contributors who file issues, reproduce bugs, suggest improvements, write code in this repo (and other upstream or downstream ones) and help users in the Plotly community forum. The following people deserve special recognition for their outsized contributions to this ecosystem:
147146

@@ -170,10 +169,9 @@ Plotly.js is at the core of a large and dynamic ecosystem with many contributors
170169
|**Chris Parmer**| [@chriddyp](https://github.com/chriddyp) | | Hall of Fame |
171170
|**Alex Vados**| [@alexander-daniel](https://github.com/alexander-daniel) | | Hall of Fame |
172171

173-
---
174172
## Copyright and license
175173

176-
Code and documentation copyright 2021 Plotly, Inc.
174+
Code and documentation copyright Plotly, Inc.
177175

178176
Code released under the [MIT license](https://github.com/plotly/plotly.js/blob/master/LICENSE).
179177

@@ -183,10 +181,7 @@ This project is maintained under the [Semantic Versioning guidelines](https://se
183181

184182
See the [Releases section](https://github.com/plotly/plotly.js/releases) of our GitHub project for changelogs for each release version of plotly.js.
185183

186-
---
187184
## Community
188185

189-
* Follow [@plotlygraphs](https://twitter.com/plotlygraphs) on Twitter for the latest Plotly news.
190-
* Implementation help may be found on community.plot.com (tagged [`plotly-js`](https://community.plotly.com/c/plotly-js)) or
191-
on Stack Overflow (tagged [`plotly`](https://stackoverflow.com/questions/tagged/plotly)).
186+
* Implementation help may be found on community.plot.com (tagged [`plotly-js`](https://community.plotly.com/c/plotly-js)) or on Stack Overflow (tagged [`plotly`](https://stackoverflow.com/questions/tagged/plotly)).
192187
* Developers should use the keyword `plotly` on packages which modify or add to the functionality of plotly.js when distributing through [npm](https://www.npmjs.com/browse/keyword/plotly).

0 commit comments

Comments
 (0)