Commit Graph

4202 Commits

Author SHA1 Message Date
Jacco van den Berg
f796c7b475
Add padding to pointLabels type, add type to scriptable context (#10404)
* Add padding to pointLabelTypings and add type field to context

* Use correct scriptable helper

* Remove trailing space
2022-06-07 15:59:41 +03:00
stockiNail
a0609d77ff
Fix default value of 'includeInvisible' option in the documentation (#10400) 2022-06-06 10:04:33 -04:00
dependabot[bot]
8dd8760f1b
Bump eventsource from 1.1.0 to 1.1.1 (#10393)
Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.1.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.1)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-02 07:04:48 +03:00
Jacco van den Berg
7b01d33fed
clarify api docs (#10392) 2022-06-01 14:38:39 -04:00
Jacco van den Berg
2486fe2b1e
Allow for each dataset to be individually typed without a main type (#10387)
* allow for each dataset to be individually typed without a main type
* fix lint issues
* add extra test cases
2022-05-31 14:01:39 -04:00
Jacco van den Berg
1a1151b122
Bump to 3.8.0 (#10377) 2022-05-25 10:06:57 -04:00
Jacco van den Berg
5173d05978
Types: Allow font to be partial scriptable and individually scriptable (#10364)
* allow font scriptable to return partial object and be scriptable
* add other elements as scriptable
* rename variable for context to resolve lint issue
* add duplicate font for non scriptable
* change to scriptableOptions
* fix parameter
* missing space
* Change name of helper function to match other helper function
2022-05-25 07:49:12 -04:00
Yiwen Wang
ebcaff15c2
Add option to include invisible points (#10362)
* Add option to include invisible points

* Minor fixes

* Add doc for newly added option

* Fix typo

* Add test for newly added option

* Improve description of the new option

* Update docs/configuration/interactions.md

Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>

Co-authored-by: Yiwen Wang 🌊 <yiwwan@microsoft.com>
Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
2022-05-25 13:25:27 +03:00
Evert Timberg
cf780a5db5
Update to v0.2.1 color dependency to fix bug with invalid colours (#10371)
* Update to v0.2.0 color dependency to fix bug with invalid colours
* v0.2.1
2022-05-23 12:51:17 -04:00
Evert Timberg
3c0a71a3fc
Coveralls no longer runs on Windows CI (#10367) 2022-05-22 13:15:34 -04:00
Jacco van den Berg
1422c93dc0
Update scale polarArea correctly on data hide (#10340)
* give correct range back for polarArea
* added test
* tab to spaces
2022-05-22 09:50:32 -04:00
linkviii
4183b7f04a
Add links to docs in all the samples (#10308) 2022-05-21 11:02:13 -04:00
Kyle J
4eb65c014a
Correct auto.esm.js import to allow use directly from the browser 2022-05-11 10:52:29 -04:00
Jacco van den Berg
8ac3cc2191
Remove test job from windows runner (#10345)
* Remove test stop from windows runner

* consistent formatting
2022-05-08 20:19:41 +03:00
t-mangoe
d573dfb63e
display tooltips only at points in chart area (#10289)
* show only points in chart area

* use the _isPointInArea helper function
2022-05-07 10:43:47 -04:00
Jacco van den Berg
2c268f0943
Resolve canvasGradient is undefined in node (#10328)
* Resolve canvasgradient is not defined in node

* Remove trailing white space

* export isPaternOrGradient helper with typings

* fix lint failure, single qoute

* Allow for string inputs too to function
2022-05-03 08:21:43 -04:00
luke-heberling
a9765042f1
Use abs() when comparing for spanGaps (#10316)
* Use abs() when comparing for spanGaps

* tests for spanGaps w/ integer (boolean already covered)

* remove redundant default config from spanGaps tests
2022-05-01 14:28:41 -04:00
dependabot[bot]
d8d69f5875
Bump async from 2.6.3 to 2.6.4 (#10320)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-25 16:57:17 -04:00
dependabot[bot]
38f4632732
Bump moment from 2.29.1 to 2.29.2 (#10290)
Bumps [moment](https://github.com/moment/moment) from 2.29.1 to 2.29.2.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/moment/moment/compare/2.29.1...2.29.2)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-25 23:23:51 +03:00
Evert Timberg
54dcd6a6d3
Trigger legend onLeave when the mouse leaves the canvas (#10301) 2022-04-15 19:36:42 -04:00
Evert Timberg
5c3dc932b6
Enable configuration of radial scale point label border radius (#10293) 2022-04-15 18:31:09 -04:00
Jukka Kurkela
4b5ca7f24e
Types: add 'middle' to borderSkipped (#10283) 2022-04-05 18:52:45 +03:00
Evert Timberg
a39f694184
Allow time scale to offset using skipped ticks (#10278) 2022-04-03 16:05:43 -04:00
Evert Timberg
43889f247c
Document tooltip draw hooks and only call hooks when the tooltip draws (#10276)
* Document tooltip draw hooks and only call hooks when the tooltip draws

* Update tests
2022-04-03 10:09:46 -04:00
Evert Timberg
09128947d5
Export types for cartesian and radial tick options (#10275) 2022-04-03 16:40:31 +03:00
Akira Aso
16f6b8cb41
Fix a typo in data-structures.md (#10259)
Change `The provides labels can be` to `The provided labels can be`.

Co-authored-by: Akira Aso <44665462+akiorange@users.noreply.github.com>
2022-03-31 08:08:21 -04:00
Jacco van den Berg
1c1368bead
add startangle to radial scale opts (#10269) 2022-03-31 08:08:13 -04:00
Jacco van den Berg
4c42bd0919
Correct chart initialization flow (#10266)
* update flow chart to reflect correct flow

* Update drawio file
2022-03-31 08:08:00 -04:00
dependabot[bot]
3b9042005b
Bump minimist from 1.2.5 to 1.2.6 (#10260)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-31 14:54:05 +03:00
Josh Kelley
c057c96693
Interaction functions (#10046)
* Refactor get...Items functions to take events rather than positions

To work toward exposing something like the get...Items functions.

* Switch getAxisItems to use optimizedEvaluateItems

optimizedEvaluateItems falls back to evaluating all items for unsorted items, and sorting / optimizing ought to be okay, so this ought to be equivalent.

* Performance

* Consolidate getRelativePosition

helpers.dom.js's getRelativePosition already had logic to handle ChartEvent vs. Event (as demonstrated by the `native` check within `getCanvasPosition`), so it's redundant for core.interaction.js to have its own `native` check.

Update `getRelativePosition` to use the same `native` check as core.interaction.js's version.  As best as I can tell, the ChartEvent's x and y are populated from `getRelativePosition`, so the previous `getCanvasPosition` was effectively just duplicating `getRelativePosition'`s work.  I added a test to verify this; it depends on a local, not-yet-submitted change in chartjs-test-utils' `triggerMouseEvent` to return the mouse event that it triggers.

* Add an API to refactor duplicate isPointInArea

* Rename and update JSDoc to prepare for making this public

* Give functions a consistent, generic interface

* Export functions for discussion

* Code review feedback

Add a non-null assertion, as requested in code review.

Add JSDoc to clarify that `getCanvasPosition` now expects a native `Event`, not a `ChartEvent`.  Add `@ts-ignore`; `getCanvasPosition` relied on some loose conversions between `Event`, `TouchEvent`, and `Touch` that would require several changes to make TypeScript happy.

* Code review feedback

Return the event directly, to speed up the code a bit.  Add JSDoc to help communicate its intent.  Update various comments.

* Finalize exports; add docs and TypeScript

* Update src/helpers/helpers.dom.js

* Update src/helpers/helpers.dom.js

Only thing needed actually is the update of chartjs-test-utils to 0.4.0

* Bump chartjs-test-utils dependency

To get supporting work from https://github.com/chartjs/chartjs-test-utils/pull/19

Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>
2022-03-24 09:02:30 -04:00
Martin Steiger
ec6590027d
Add missing fields to the ScriptableContext type (#10254) 2022-03-24 08:42:46 -04:00
Jacco van den Berg
9568a315d2
Update link to filler plugin (#10250) 2022-03-20 19:59:12 -04:00
Jacco van den Berg
e9ce6ce60d
resolve circulair import (#10247) 2022-03-18 17:39:55 -04:00
CommanderRoot
acc7d9e04a
Replace deprecated String.prototype.substr() (#10243)
String.prototype.substr() is deprecated (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr) so we replace it with similar functions which aren't deprecated.
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-03-18 17:38:28 -04:00
dependabot[bot]
285d845159
Bump karma from 6.3.14 to 6.3.16 (#10204)
Bumps [karma](https://github.com/karma-runner/karma) from 6.3.14 to 6.3.16.
- [Release notes](https://github.com/karma-runner/karma/releases)
- [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md)
- [Commits](https://github.com/karma-runner/karma/compare/v6.3.14...v6.3.16)

---
updated-dependencies:
- dependency-name: karma
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-02 16:42:03 +02:00
dependabot[bot]
344aca5c7a
Bump url-parse from 1.5.7 to 1.5.10 (#10200)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.7 to 1.5.10.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.7...1.5.10)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-26 15:58:12 +02:00
dependabot[bot]
c7885f6989
Bump prismjs from 1.25.0 to 1.27.0 (#10198)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.25.0 to 1.27.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.25.0...v1.27.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-26 07:42:04 -05:00
Adam Parkin
6a6693e26d
Update animations.md (#10184)
Fix broken link to animations sample.
2022-02-22 08:37:33 -05:00
Evert Timberg
d3a9bf375c
Allow individual chart controllers to opt-in to the decimation plugin (#10182)
* Allow individual chart controllers to opt-in to the decimation plugin

* Code review feedback
2022-02-21 08:33:33 -05:00
Jacco van den Berg
16e6acc6b9
Allow array for line opts in dataset (#10179)
* fix line as array ts error

* added test

* implement only for the border,background color and radius
2022-02-20 21:31:42 -05:00
dependabot[bot]
2f7550db05
Bump url-parse from 1.5.3 to 1.5.7 (#10181)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.3 to 1.5.7.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.5.3...1.5.7)

---
updated-dependencies:
- dependency-name: url-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-19 19:19:00 +02:00
Jacco van den Berg
6c129267f8
remove hardcoded licenseYear in docs (#10158) 2022-02-14 04:26:22 +02:00
Evert Timberg
edd764fcb5
minimum bar length setting keeps bar base in view (#10157) 2022-02-13 15:27:46 -05:00
Jacco van den Berg
c80b1450f5
update link to license and bump license year (#10156)
* update link to license and bump license year
* another license year bump
2022-02-13 11:27:29 -05:00
Evert Timberg
759a56c3a5
Document scale update plugin hooks (#10154) 2022-02-13 10:22:12 -05:00
dependabot[bot]
6e2c3d8349
Bump karma from 6.3.9 to 6.3.14 (#10146)
Bumps [karma](https://github.com/karma-runner/karma) from 6.3.9 to 6.3.14.
- [Release notes](https://github.com/karma-runner/karma/releases)
- [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md)
- [Commits](https://github.com/karma-runner/karma/compare/v6.3.9...v6.3.14)

---
updated-dependencies:
- dependency-name: karma
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-12 10:33:06 -05:00
Jacco van den Berg
ed68557a99
Make object notation usable for polarArea and radar (#10088)
* start to make object notation usable for polarArea
* enable object notation also for radar chart, test default key
2022-02-12 10:23:31 -05:00
Jukka Kurkela
4b542682f3
Refactor filler plugin for easier maintenance (#10040) 2022-02-12 17:22:38 +02:00
Talla2XLC
7c14ab74aa
Add new align 'inner' for X axis (#10106)
* Add new align for X axis

new align 'left-right' for options.scales['x'].ticks namespace will allow users to aling ticks: 'start" for first (left) tick and 'end' for last (right) tick

* corrected name of aligment to "inner", documentation and add test for inner labels

* delete unnecessary changes

* corrected logic for reverse axis, add tests for reverse axis and withoutY axis

* corrected chart paddings for "inner" tick align

* code clearness

* Update types/index.esm.d.ts

Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>

Co-authored-by: Talla2XLC <alexey.ivanov@epc.com.ru>
Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>
Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
2022-02-12 10:07:00 -05:00
dependabot[bot]
ed8fa1b825
Bump log4js from 6.3.0 to 6.4.1 (#10150)
Bumps [log4js](https://github.com/log4js-node/log4js-node) from 6.3.0 to 6.4.1.
- [Release notes](https://github.com/log4js-node/log4js-node/releases)
- [Changelog](https://github.com/log4js-node/log4js-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/log4js-node/log4js-node/compare/v6.3.0...v6.4.1)

---
updated-dependencies:
- dependency-name: log4js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-12 09:55:50 -05:00