@kevinburke/flot 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1814 -0
- package/LICENSE.txt +22 -0
- package/README.md +119 -0
- package/dist/flot.js +9830 -0
- package/dist/flot.min.js +2 -0
- package/dist/flot.min.js.map +1 -0
- package/dist/flot.mjs +9805 -0
- package/dist/jquery.flot.js +9869 -0
- package/dist/jquery.flot.min.js +2 -0
- package/dist/jquery.flot.min.js.map +1 -0
- package/dist/plugins/jquery.flot.crosshair.js +207 -0
- package/dist/plugins/jquery.flot.crosshair.min.js +2 -0
- package/dist/plugins/jquery.flot.crosshair.min.js.map +1 -0
- package/dist/plugins/jquery.flot.image.js +261 -0
- package/dist/plugins/jquery.flot.image.min.js +2 -0
- package/dist/plugins/jquery.flot.image.min.js.map +1 -0
- package/dist/plugins/jquery.flot.pie.js +815 -0
- package/dist/plugins/jquery.flot.pie.min.js +2 -0
- package/dist/plugins/jquery.flot.pie.min.js.map +1 -0
- package/dist/plugins/jquery.flot.resize.js +62 -0
- package/dist/plugins/jquery.flot.resize.min.js +2 -0
- package/dist/plugins/jquery.flot.resize.min.js.map +1 -0
- package/dist/plugins/jquery.flot.threshold.js +148 -0
- package/dist/plugins/jquery.flot.threshold.min.js +2 -0
- package/dist/plugins/jquery.flot.threshold.min.js.map +1 -0
- package/docs/API.md +1767 -0
- package/docs/PLUGINS.md +143 -0
- package/docs/absRelTime.md +42 -0
- package/docs/browser.md +24 -0
- package/docs/canvaswrapper.md +116 -0
- package/docs/composeImages.md +32 -0
- package/docs/drawSeries.md +35 -0
- package/docs/hover.md +21 -0
- package/docs/interactions.md +57 -0
- package/docs/logaxis.md +27 -0
- package/docs/navigate.md +110 -0
- package/package.json +53 -0
- package/source/helpers.js +168 -0
- package/source/index.js +70 -0
- package/source/jquery-adapter.js +83 -0
- package/source/jquery.canvaswrapper.js +546 -0
- package/source/jquery.colorhelpers.js +198 -0
- package/source/jquery.flot.axislabels.js +214 -0
- package/source/jquery.flot.browser.js +53 -0
- package/source/jquery.flot.categories.js +202 -0
- package/source/jquery.flot.composeImages.js +327 -0
- package/source/jquery.flot.crosshair.js +203 -0
- package/source/jquery.flot.drawSeries.js +699 -0
- package/source/jquery.flot.errorbars.js +375 -0
- package/source/jquery.flot.fillbetween.js +254 -0
- package/source/jquery.flot.flatdata.js +47 -0
- package/source/jquery.flot.hover.js +354 -0
- package/source/jquery.flot.image.js +252 -0
- package/source/jquery.flot.js +2814 -0
- package/source/jquery.flot.legend.js +444 -0
- package/source/jquery.flot.logaxis.js +299 -0
- package/source/jquery.flot.navigate.js +842 -0
- package/source/jquery.flot.pie.js +811 -0
- package/source/jquery.flot.resize.js +57 -0
- package/source/jquery.flot.saturated.js +40 -0
- package/source/jquery.flot.selection.js +552 -0
- package/source/jquery.flot.stack.js +220 -0
- package/source/jquery.flot.symbol.js +98 -0
- package/source/jquery.flot.threshold.js +144 -0
- package/source/jquery.flot.time.js +584 -0
- package/source/jquery.flot.touch.js +320 -0
- package/source/jquery.flot.touchNavigate.js +357 -0
- package/source/jquery.flot.uiConstants.js +9 -0
- package/source/jquery.js +9473 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2007-2014 IOLA and Ole Laursen
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
|
4
|
+
obtaining a copy of this software and associated documentation
|
|
5
|
+
files (the "Software"), to deal in the Software without
|
|
6
|
+
restriction, including without limitation the rights to use,
|
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the
|
|
9
|
+
Software is furnished to do so, subject to the following
|
|
10
|
+
conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be
|
|
13
|
+
included in all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
# @kevinburke/flot
|
|
2
|
+
|
|
3
|
+
A JavaScript plotting library for engineering and scientific applications.
|
|
4
|
+
|
|
5
|
+
This is a maintained fork of [flot/flot](https://github.com/flot/flot), which
|
|
6
|
+
has been unmaintained since 2019. The plotting API and behavior are the same;
|
|
7
|
+
this fork modernizes the build toolchain, test infrastructure, and packaging.
|
|
8
|
+
|
|
9
|
+
## Differences from flot/flot
|
|
10
|
+
|
|
11
|
+
- **No jQuery required**: the core library works without jQuery. A jQuery
|
|
12
|
+
adapter is included for backwards compatibility with existing `$.plot()`
|
|
13
|
+
code.
|
|
14
|
+
- **ES module output**: `import { plot } from '@kevinburke/flot'` works with
|
|
15
|
+
modern bundlers. Tree-shakeable.
|
|
16
|
+
- **No vendored dependencies**: `jquery.event.drag`, `jquery.mousewheel`, and
|
|
17
|
+
`globalize` replaced with native Pointer Events, `wheel` event, and `Intl`.
|
|
18
|
+
- **Build**: Rollup produces ES module, IIFE, and minified outputs. Source
|
|
19
|
+
files are ES modules.
|
|
20
|
+
- **Tests**: Vitest (unit) + Playwright (browser). All original assertions
|
|
21
|
+
preserved.
|
|
22
|
+
- **CI**: GitHub Actions. Size budget enforced via size-limit (30 KB brotli).
|
|
23
|
+
- **IE dropped**: minimum target is ES2019 (Chrome 73+, Firefox 67+, Safari
|
|
24
|
+
12.1+, Edge 79+).
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install @kevinburke/flot
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Usage without jQuery
|
|
33
|
+
|
|
34
|
+
As an ES module:
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
import { plot } from '@kevinburke/flot';
|
|
38
|
+
|
|
39
|
+
plot(document.getElementById('placeholder'), data, options);
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Or via `<script>` tag from a CDN:
|
|
43
|
+
|
|
44
|
+
```html
|
|
45
|
+
<script src="https://unpkg.com/@kevinburke/flot@5.0.0/dist/flot.min.js"></script>
|
|
46
|
+
<script>
|
|
47
|
+
Flot.plot(document.getElementById('placeholder'), data, options);
|
|
48
|
+
</script>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Usage with jQuery (backwards compatible)
|
|
52
|
+
|
|
53
|
+
```html
|
|
54
|
+
<script src="https://unpkg.com/jquery@3/dist/jquery.min.js"></script>
|
|
55
|
+
<script src="https://unpkg.com/@kevinburke/flot@5.0.0/dist/jquery.flot.min.js"></script>
|
|
56
|
+
<script>
|
|
57
|
+
$.plot("#placeholder", data, options);
|
|
58
|
+
</script>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The jQuery adapter registers `$.plot()`, `$.color`, and `$.fn.plot()` so
|
|
62
|
+
existing code works unchanged.
|
|
63
|
+
|
|
64
|
+
## Basic example
|
|
65
|
+
|
|
66
|
+
Create a placeholder div with explicit dimensions:
|
|
67
|
+
|
|
68
|
+
```html
|
|
69
|
+
<div id="placeholder" style="width:600px;height:300px"></div>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Then call `plot`:
|
|
73
|
+
|
|
74
|
+
```js
|
|
75
|
+
import { plot } from '@kevinburke/flot';
|
|
76
|
+
|
|
77
|
+
plot(document.getElementById('placeholder'), [
|
|
78
|
+
[[0, 0], [1, 1], [2, 4]],
|
|
79
|
+
[[0, 3], [4, 8], [8, 5]],
|
|
80
|
+
], { yaxis: { max: 10 } });
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The plot function draws the chart immediately and returns a plot object. See
|
|
84
|
+
the [API reference](docs/API.md) for the full option set.
|
|
85
|
+
|
|
86
|
+
## Documentation
|
|
87
|
+
|
|
88
|
+
- [API reference](docs/API.md)
|
|
89
|
+
- [Plugins](docs/PLUGINS.md)
|
|
90
|
+
- [Interactions](docs/interactions.md)
|
|
91
|
+
- Examples are in the `examples/` directory.
|
|
92
|
+
|
|
93
|
+
## Development
|
|
94
|
+
|
|
95
|
+
All commands go through Make:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
make install # install dependencies into node_modules
|
|
99
|
+
make build # build dist/ (main bundle + standalone plugins)
|
|
100
|
+
make lint # run Biome lint + format check
|
|
101
|
+
make format # auto-format with Biome
|
|
102
|
+
make test # run all tests (Vitest unit + Playwright browser)
|
|
103
|
+
make size # check bundle size budget (brotli)
|
|
104
|
+
make ci # lint + build + test + size (what CI runs)
|
|
105
|
+
make help # list all targets
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Releasing
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
# bump version in package.json + source/jquery.flot.js, update CHANGELOG
|
|
112
|
+
make ci # verify everything passes
|
|
113
|
+
npm publish # prepack hook runs the build automatically
|
|
114
|
+
git tag v5.x.y && git push origin v5.x.y
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## License
|
|
118
|
+
|
|
119
|
+
MIT. See [LICENSE.txt](LICENSE.txt).
|