Commit Graph

3779 Commits

Author SHA1 Message Date
Jukka Kurkela
6de5b3fa9e
Small chores (#8408) 2021-02-10 18:06:48 +02:00
Jukka Kurkela
a8329e4f13
Update chartjs-test-utils to v0.2.1 (#8407)
* Update chartjs-test-utils to v0.2.0

* to 0.2.1
2021-02-10 16:17:08 +02:00
Jukka Kurkela
ddfbcf777a
Update eslint-config-chartjs to v0.3.0 (#8406) 2021-02-10 08:21:39 -05:00
stockiNail
8fa073a0d3
Fixes wrong and missing options and to bar element and dataset doc (#8404) 2021-02-09 22:43:52 +02:00
LeeLenaleee
c280337c21
Update anchorlinks and offscreen canvas compatibility (#8395) 2021-02-08 20:54:39 +02:00
Jukka Kurkela
ffe4ab14dc
Remove options.scale, in favor of options.scales.r (#8393)
Remove options.scale, in favor of options.scales.r
2021-02-06 16:19:21 -05:00
Jukka Kurkela
6737cb0de6
Codeclimate: Cognitive Complexity threshold 5->6 (#8391) 2021-02-06 08:40:39 -05:00
Jukka Kurkela
90758950ad
Update ScriptableContext, reduce warnings (#8390)
* Update ScriptableContext, reduce warnings

* _parsed is unknown[]

* Add defaults

* static defaults.

* review update

* more cancelables
2021-02-05 19:59:55 -05:00
LeeLenaleee
22ca8af1cd
Fix/type dateadapter override (#8377)
* Not totally sure this is right , but since in core.adapters.js override is part of the dateadapter it seems logical it should be there. Should also fix #8369
* implemented feedback
* Declare the dataAdapter since it will be available at runtime if someone overrides it
* remove declaration. if this is giving problems in the future it might need te be added again
2021-02-05 19:15:35 -05:00
Jukka Kurkela
505afa7f13
Fix element creation for large dataset (#8388)
* Fix element creation for large dataset
* Fix syncing
* Remove duplication
2021-02-05 17:53:05 -05:00
Jukka Kurkela
6e56ae64f7
Update types for indexAxis (#8389)
* Add indexAxis to CoreChartOptions
* Update types for indexAxis
2021-02-05 17:39:45 -05:00
Ben McCann
eb7ce4e5a0
Add raw data to context and rename dataPoint to parsed (#8318)
* Make the raw data point available in scriptable context
* Rename variables
* Update samples
2021-02-05 09:13:32 -05:00
Jukka Kurkela
0955a2590e
Improve radial gradient sample (#8383)
* Improve radial gradient sample
* Add hover
2021-02-05 07:54:52 -05:00
Jukka Kurkela
4491732ad5
Prevent 2nd parse call with zero count (#8379) 2021-02-04 16:59:57 -05:00
Evert Timberg
650956b2e1
Create a new hook to enable data decimation (#8255)
* Create a new hook to enable data decimation

The `beforeElementUpdate` hook can be used to decimate data. The chart
elements will not be created until after this hook has fired ensuring that
if decimation occurs, only the needed elements will be created.

* Address code review feedback

* Rename hook to beforeElementsUpdate

* Simplify parsing logic

* Add decimation plugin to the core

* Allow a dataset to specify a different data key

* Decimation plugin uses the dataKey feature

* Refactor the decimation plugin to support configurable algorithms

* Lint the plugin changes

* Tests for the dataKey feature

* Convert test files to tabs

* Standardize on tabs in ts files

* Remove the dataKey feature

* Replace dataKey usage in decimation plugin

We define a new descriptor for the `data` key allowing the
plugin to be simpler.

* Disable decimation when indexAxis is Y

* Simplify the decimation width approximation

* Resolve the indexAxis correctly in all cases

* Initial documentation

* Reverse check

* Update TS definitions for new plugin options

* Move defineProperty after bailouts

* Add destroy hook
2021-02-01 16:37:32 -05:00
Evert Timberg
df4cabddf1
Bump version number for beta.10 (#8364) 2021-02-01 23:31:22 +02:00
Jukka Kurkela
2890b7022b
Shave off some bytes (#8362) 2021-02-01 08:39:43 -05:00
Evert Timberg
49b0916c19
Update type map names (#8356)
* Rename ElementOptions to ElementOptionsByType

* Rename CommonOptions to CommonElementOptions

* Rename PluginOptions to PluginOptionsByType
Add new PluginChartOptions and remove some duplicates

* Rename ScaleOptions to ScaleOptionsByType

* Use Partial where appropriate
2021-02-01 08:38:37 -05:00
Jukka Kurkela
6e555e2285
Prevent test timeouts due to Chrome backgrounding (#8360)
* Prevent test timeouts due to Chrome backgrounding

* Add karma.conf.js to test filters
2021-02-01 07:50:18 -05:00
LeeLenaleee
ae0c8dd457
align text inside chart for far-aligned labels passing test (#8359)
* align text inside chart for far-aligned labels

* added fix for failing test on suggestion of @kurkle

Co-authored-by: Marcel Samyn <marcel.samyn@lab900.com>
2021-01-31 15:19:40 -05:00
Jukka Kurkela
ad84d285d8
Rename LayoutItem.fullWidth to fullSize (#8358) 2021-01-31 13:44:44 -05:00
LeeLenaleee
b50fba3759
Fix/scatter tooltip mode (#8354)
* scatter tooltip should be point by default
* edited mode on better level and updated docs to be bit more clear
2021-01-30 16:22:01 -05:00
Josh Kelley
5eb3682b9f
Give elements their own interface definition (#8290)
From what I understand, if we want to allow registering additional element options (see [here][1] for an example), then the element options need to be a top-level interface so that they can be used with TypeScript's [declaration merging][2].

[1]: https://github.com/chartjs/chartjs-plugin-annotation/pull/275#issuecomment-742754562
[2]: https://www.typescriptlang.org/docs/handbook/declaration-merging.html
2021-01-30 14:48:18 -05:00
LeeLenaleee
bc312d0dbc
feature: choose custom point style for bar legend display (#8341)
* add feature to choose custom point style for bar legend display
* add documentation and type
* the docs are in the right place now
2021-01-30 11:02:08 -05:00
Evert Timberg
8cca4fe5b9
getRelativePosition takes two arguments (#8336) 2021-01-25 22:59:19 +02:00
dependabot[bot]
0732aef4be
Bump socket.io from 2.3.0 to 2.4.1 (#8333)
Bumps [socket.io](https://github.com/socketio/socket.io) from 2.3.0 to 2.4.1.
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/2.4.1/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/2.3.0...2.4.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-01-22 19:05:54 -05:00
LeeLenaleee
4f74a92b80
Add documentation for vertical line charts (#8327)
* add documentation for vertical line charts

* remove the indexAxis prop from dataset since it doesnt belong there, fix horizontal bars example and make vertical line example

* 2 bars to line rename

* fix v3-migration guide

* revert deletion of prop from table in bar, added in line. Removed anchor point in link from v3 docs

* put right text in general of line
2021-01-18 16:15:30 +02:00
Marcel Samyn
ff19ea4be7
fix canvas clearRect size calculation (#8328)
Co-authored-by: Marcel Samyn <marcel.samyn@lab900.com>
2021-01-18 08:59:13 -05:00
Evert Timberg
06fa8a4c98
Update to test utils 0.1.2 to track font setting (#8325) 2021-01-18 07:40:18 -05:00
LeeLenaleee
df1303f943
tooltip not showing, edit config (#8323) 2021-01-17 10:33:05 -05:00
Jukka Kurkela
3c64bc88e8
Doughnut: complete radians to degrees conversion (#8321) 2021-01-16 16:04:48 -05:00
Evert Timberg
eb88909e95
Bump v3.0.0-beta.9 (#8320)
Co-authored-by: Evert Timberg <ever.timberg+github@gmail.com>
2021-01-16 14:15:20 -05:00
Ben McCann
00dbe71dbb
Revert "Update spelling of cancellable (#8236)" (#8312)
This reverts commit e6dfc47927.
2021-01-16 21:14:15 +02:00
LeeLenaleee
32b3242585
Fix reading wrong property from font object for font string (#8315) 2021-01-16 21:13:13 +02:00
Ben McCann
a730fc68fa
Fix broken links in tooltip docs (#8316) 2021-01-16 21:12:43 +02:00
Jukka Kurkela
ea34e8b814
Disable Path2D caching when chart is animated (#8319)
* Disable Path2D caching when chart is animated
* Add note to performance docs
2021-01-16 14:06:27 -05:00
LeeLenaleee
a58d43cbda
fixes #8304 (Missing type) beta 8 broken typescript (#8305)
* fixes #8304

* Update layout.d.ts

First letter of variable from capital to normal
2021-01-14 07:45:12 -05:00
Jukka Kurkela
ad941813b6
Bump version to beta.8 (#8300) 2021-01-13 07:48:26 -05:00
Jukka Kurkela
1dc2384796
Only draw points when radius >= 0.1 (#8302) 2021-01-13 07:44:03 -05:00
LeeLenaleee
19442701ea
clarification that strikethrough uses same color as the label color (#8289) 2021-01-10 15:17:02 -05:00
LeeLenaleee
aa9a04a014
Skip delete undefined stack (#8291)
* fixes error on undefined stacks
* added test for functionality
2021-01-09 10:27:18 -05:00
Josh Kelley
fa375ff448
Update TypeScript ESLint configuration (#8288)
Using TypeScript-specific ESLint rules fixes some spurious ESLint warnings.
2021-01-08 16:01:20 -05:00
Evert Timberg
e63beb8c6d
Add note about v3 dev code in readme (#8283)
* Add note about v3 dev code in readme

* Adjust note based on feedback
2021-01-08 06:56:01 +02:00
stockiNail
397d5bdee4
Remove empty line from the options table (#8274) 2021-01-07 21:48:49 +02:00
LeeLenaleee
93b900efdd
Update doughnut.mdx (#8279)
Updating quotation mark to fix broken link
2021-01-07 07:54:18 -05:00
Jukka Kurkela
df11fd98cc
Fix incorrect defaults location for Bubble (#8271) 2021-01-05 07:57:09 -05:00
Jukka Kurkela
0c48c1148a
Fix resize bug of line / radar charts (#8266)
* Line: Make sure control points are re-calculated

* Radar: always set point on update
2021-01-05 07:24:12 +02:00
Jukka Kurkela
81a1e9a95e
Add type linting (#8264) 2021-01-05 07:23:30 +02:00
LeeLenaleee
7c6aff6fb3
Update link to latest version of V2 Docs (#8270) 2021-01-04 15:55:55 -05:00
Ben McCann
fe2fd2ccf8
Upgrade TypeDoc (#8267) 2021-01-03 10:23:29 -05:00