@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.
Files changed (69) hide show
  1. package/CHANGELOG.md +1814 -0
  2. package/LICENSE.txt +22 -0
  3. package/README.md +119 -0
  4. package/dist/flot.js +9830 -0
  5. package/dist/flot.min.js +2 -0
  6. package/dist/flot.min.js.map +1 -0
  7. package/dist/flot.mjs +9805 -0
  8. package/dist/jquery.flot.js +9869 -0
  9. package/dist/jquery.flot.min.js +2 -0
  10. package/dist/jquery.flot.min.js.map +1 -0
  11. package/dist/plugins/jquery.flot.crosshair.js +207 -0
  12. package/dist/plugins/jquery.flot.crosshair.min.js +2 -0
  13. package/dist/plugins/jquery.flot.crosshair.min.js.map +1 -0
  14. package/dist/plugins/jquery.flot.image.js +261 -0
  15. package/dist/plugins/jquery.flot.image.min.js +2 -0
  16. package/dist/plugins/jquery.flot.image.min.js.map +1 -0
  17. package/dist/plugins/jquery.flot.pie.js +815 -0
  18. package/dist/plugins/jquery.flot.pie.min.js +2 -0
  19. package/dist/plugins/jquery.flot.pie.min.js.map +1 -0
  20. package/dist/plugins/jquery.flot.resize.js +62 -0
  21. package/dist/plugins/jquery.flot.resize.min.js +2 -0
  22. package/dist/plugins/jquery.flot.resize.min.js.map +1 -0
  23. package/dist/plugins/jquery.flot.threshold.js +148 -0
  24. package/dist/plugins/jquery.flot.threshold.min.js +2 -0
  25. package/dist/plugins/jquery.flot.threshold.min.js.map +1 -0
  26. package/docs/API.md +1767 -0
  27. package/docs/PLUGINS.md +143 -0
  28. package/docs/absRelTime.md +42 -0
  29. package/docs/browser.md +24 -0
  30. package/docs/canvaswrapper.md +116 -0
  31. package/docs/composeImages.md +32 -0
  32. package/docs/drawSeries.md +35 -0
  33. package/docs/hover.md +21 -0
  34. package/docs/interactions.md +57 -0
  35. package/docs/logaxis.md +27 -0
  36. package/docs/navigate.md +110 -0
  37. package/package.json +53 -0
  38. package/source/helpers.js +168 -0
  39. package/source/index.js +70 -0
  40. package/source/jquery-adapter.js +83 -0
  41. package/source/jquery.canvaswrapper.js +546 -0
  42. package/source/jquery.colorhelpers.js +198 -0
  43. package/source/jquery.flot.axislabels.js +214 -0
  44. package/source/jquery.flot.browser.js +53 -0
  45. package/source/jquery.flot.categories.js +202 -0
  46. package/source/jquery.flot.composeImages.js +327 -0
  47. package/source/jquery.flot.crosshair.js +203 -0
  48. package/source/jquery.flot.drawSeries.js +699 -0
  49. package/source/jquery.flot.errorbars.js +375 -0
  50. package/source/jquery.flot.fillbetween.js +254 -0
  51. package/source/jquery.flot.flatdata.js +47 -0
  52. package/source/jquery.flot.hover.js +354 -0
  53. package/source/jquery.flot.image.js +252 -0
  54. package/source/jquery.flot.js +2814 -0
  55. package/source/jquery.flot.legend.js +444 -0
  56. package/source/jquery.flot.logaxis.js +299 -0
  57. package/source/jquery.flot.navigate.js +842 -0
  58. package/source/jquery.flot.pie.js +811 -0
  59. package/source/jquery.flot.resize.js +57 -0
  60. package/source/jquery.flot.saturated.js +40 -0
  61. package/source/jquery.flot.selection.js +552 -0
  62. package/source/jquery.flot.stack.js +220 -0
  63. package/source/jquery.flot.symbol.js +98 -0
  64. package/source/jquery.flot.threshold.js +144 -0
  65. package/source/jquery.flot.time.js +584 -0
  66. package/source/jquery.flot.touch.js +320 -0
  67. package/source/jquery.flot.touchNavigate.js +357 -0
  68. package/source/jquery.flot.uiConstants.js +9 -0
  69. 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).