Commit Graph

161 Commits

Author SHA1 Message Date
Jukka Kurkela
aa6a9737bd
Add declaration for Decimation plugin (#9172) 2021-05-28 07:36:24 -04:00
Jon Rimmer
cffce1b46f
Correctly extend ExtendedPlugin interface (#9124) 2021-05-19 10:39:48 -04:00
Jon Rimmer
8c5d6be197
Add missing props to ChartArea type (#9123) 2021-05-19 10:39:27 -04:00
Akihiko Kusanagi
0ba5c70618
Support monotone cubic interpolation for vertical line charts (#9084)
* Support monotone cubic interpolation for vertical line charts

* Use more more intuitive veriable names
2021-05-14 17:07:26 -04:00
Evert Timberg
927f24a809
Add test for issue 9085 (#9091) 2021-05-14 23:58:02 +03:00
Jukka Kurkela
9a787705fd
Types: Export DecinmationAlgorithm as const (#9046) 2021-05-07 15:49:23 -04:00
Jukka Kurkela
7c3a412887
Add includeBounds option for cartesian ticks (#9020)
* Add includeBounds option for cartesian ticks

* Types, test and fix

* lint

* Improve linear tick min/max collision detection

* Update comments
2021-05-07 09:03:37 +03:00
Evert Timberg
49e7edae49
Enable scriptable element chart options (#9012) 2021-05-01 13:30:14 -04:00
Evert Timberg
ea7b8cb04f
Add test for DecimationAlgorithm type (#9010)
* Add test for DecimationAlgorithm type
* Allow strings to be set
* Linting
2021-05-01 12:36:40 -04:00
Evert Timberg
af7965fc31
Cartesian scale tick backdrop (#8931) 2021-04-18 12:49:22 +03:00
Evert Timberg
e29ba78cd1
Allow the events option to be changed at runtime (#8928) 2021-04-17 14:08:36 -04:00
Jukka Kurkela
aee45c611e
Fix tooltip positioners and scriptable signature (#8909) 2021-04-16 15:45:33 -04:00
Evert Timberg
cc4ce7adef
Do not redraw endlessly on mouse move (#8898)
* Do not redraw endlessly on mouse move

The tooltip incorrectly determined that the position changed leading to many redraws

* Code review feedback
2021-04-15 16:36:03 -04:00
Jacco van den Berg
f76ca010e8
add number, null and undefined as valid return types (#8891) 2021-04-13 22:24:59 +03:00
Jukka Kurkela
f8885ce7a2
Font validate style, move defaults to weight (#8877) 2021-04-10 15:58:11 -04:00
Evert Timberg
d6d189c804
Legend boxes support borderRadius (#8875) 2021-04-10 15:05:34 -04:00
Evert Timberg
7ee498e412
Tooltip colorbox supports configurable borderWidth, borderRadius, and dash effect (#8874)
* Start on extending tooltip style
* Correct borderRadius implementation
* Tests of updated tooltip styling
* Update docs
2021-04-10 13:37:22 -04:00
Jukka Kurkela
ba84cc5c2a
Filler: support segment backgroundColor (#8864) 2021-04-09 19:10:48 -04:00
Jukka Kurkela
4eb59454be
Allow styling of line segments (#8844)
Allow styling of line segments

* docs & sample
* Types
* update sample
2021-04-08 18:02:12 -04:00
Moses Mendoza
efc1902da7
Include grace in LinearScaleOptions type definition (#8847)
This commit adds the `grace` option, to the LinearScaleOptions type definition
as documented here,
https://www.chartjs.org/docs/latest/axes/cartesian/linear.html#grace. Without
this commit the TS compiler does not allow the option.

Signed-off-by: Moses Mendoza <mendoza.moses@gmail.com>
2021-04-08 07:21:03 +03:00
Evert Timberg
238bfa589c
Add the ability to change font color per legend item (#8800) 2021-04-03 11:55:27 -04:00
Jukka Kurkela
6df7fae625
Add drawTime option to filler plugin (#8796) 2021-04-03 08:13:00 -04:00
Evert Timberg
6f6b1b2d17
Doughnut/Pie chart border radius (#8682)
* Arc with rounded ends implementation
* End style option
* Working border radius implementation for arcs
* Linting
* Fix bug introduced when converting to new border object
* Fix bugs identified by tests
* Arc border radius tests
* Add test to cover small borderRadii
* Reduce the weight of the arc border implementation
* lint fix
2021-04-03 07:58:51 -04:00
Evert Timberg
8780e15c73
v3.0.0 version bump (#8781)
* v3.0.0 version bump
* Update urls for next -> latest
* Remove TS urls
2021-04-02 14:56:54 -04:00
Evert Timberg
877f4c6b2d
Fix tooltip align & external types (#8782) 2021-04-02 10:53:00 -04:00
Jukka Kurkela
dd99005b5a
Remove line interaction overrides + hover.onHover (#8770)
* Remove interaction mode overrides + hover.onHover

* Restore bar override
2021-04-01 13:47:11 -04:00
Josh Kelley
54c5b7a084
Add a convenience alias for scale options (#8732)
* Add a convenience alias for scale options

Closes #8731

* Add an automated test

* Use parameter for a more realistic test
2021-03-26 16:20:59 -04:00
Jukka Kurkela
499a71d4eb
Make type-tests strict (#8717) 2021-03-25 15:09:35 -04:00
Josh Kelley
3671c01c26
Distribute types as is (#8720)
I had initially seen some oddities around type augmentation for type definitions in subdirectories of `types`, and using Rollup seemed to help with that. However, now that all of Chart.js's main types are directly under `types`, there seems to be no need for this.

This simplifies the build process, since it no longer needs to use rollup-plugin-dts.

It also improves some third-party tools. For example, I'm in the habit of using WebStorm's "Go To Declaration or Usages" hotkey with third-party TypeScript definitions as a quick way of getting more information about an API. With the Rollup-generate types, that works poorly; WebStorm goes to the imported-and-re-exported symbol within the barely-readable machine-generated dist/chart.esm.d.ts file, and I have to navigate two more hops to find the actual definitions.
2021-03-25 15:08:00 -04:00
Josh Kelley
9293dda4a7
Minor type fixes (#8719)
* Update RadialLinearScaleOptions.pointLabels.callback type

The code passes `index` as the second parameter, and one of the tests uses this.  `@default true` doesn't seem to make sense.

* Add types for additional documented parameters in tooltip callbacks
2021-03-25 11:09:01 -04:00
Jukka Kurkela
7fff21b3bb
Add defaults.describe/defaults.override typings (#8716) 2021-03-24 15:30:45 -04:00
Evert Timberg
9583edd38d
LayoutItem.update should return void (#8714) 2021-03-24 13:38:25 -04:00
Evert Timberg
2fc98ddc39
Allow fill: true and null in ChartDataset.data (#8700)
* Handle `fill: true`
* ChartDataset allow number/null data
2021-03-22 18:59:50 -04:00
Jukka Kurkela
d79b5a3d60
Add typings for throttled and debounce (#8689)
* Add typings for throttled and debounce
* Review feedback
* args for fn too
* one more
2021-03-21 11:50:28 -04:00
Jukka Kurkela
537064be9c
Modify Scale typing (#8681) 2021-03-21 10:20:05 -04:00
Evert Timberg
375d856a87
Expose formatNumber as a helper (#8683) 2021-03-21 11:04:27 +02:00
Jukka Kurkela
97136d0cbf
Add textAlign for legend labels (#8665)
* Add textAlign for legend labels

* Update tests
2021-03-18 07:37:03 -04:00
coyotte508
cc7a3fdb06
Update stacked option's typing (#8656) 2021-03-17 10:26:30 -04:00
Jukka Kurkela
420aa027b3
Exclude base-line from bar size (#8648)
* Exclude base-line from bar size

* lint

* add to types
2021-03-16 08:49:19 -04:00
Jukka Kurkela
0a579b6813
Add alignToPixles option for scales (#8649) 2021-03-16 08:41:51 -04:00
Evert Timberg
1f6d0a244b
Linear Scale: Ability to specify a fixed number of ticks (#8643)
* Option to specify exact number of ticks on linear scale
* Fix issue description in tests
* Add tests for conditions where min/max do not align with niceMin/niceMax
* Refactor linear tick generation algorithm
* Add TS definitions
* Update docs
* Code review feedback + lint fixes
2021-03-15 08:49:25 -04:00
Jukka Kurkela
f744c3bde6
Add x/y shorthand for padding options (#8637) 2021-03-14 11:21:30 -04:00
Evert Timberg
d84db2cefc
Radial scale point label backdrop color (#8633)
* Radial scale point label backdrop color

* Update default tests

* backdropPadding is a single setting

* Up the tolerance a bit

* Update tick backdrop padding options
2021-03-13 17:37:43 -05:00
Evert Timberg
6ac89cbb25
Rename scale gridLines options to be clearer (#8628)
* Rename `options.gridLines` to `options.grid`

* Rename `offsetGridLines` to `offset`
2021-03-13 19:49:09 +02:00
Jukka Kurkela
aee979da54
Types: fix bubble chart options (#8625) 2021-03-13 08:04:59 -05:00
Jukka Kurkela
a4231486eb
helpers.curve cleanup (#8608)
* helpers.curve cleanup
* Use distanceBetweenPoints
2021-03-10 09:32:54 -05:00
Jukka Kurkela
0c838432fc
Disable warning of unused variables in types/tests (#8607) 2021-03-10 08:13:04 -05:00
Evert Timberg
275fdaf3da
Expose radial scale point label positions (#8588) 2021-03-07 16:58:45 -05:00
Jukka Kurkela
160534f913
Add 'single' mode for stacking (#8586)
* Add `'single'` mode for stacking

* Update fixture
2021-03-07 10:52:31 -05:00
Jukka Kurkela
8d6e87881a
Relocate chart type and dataset type defaults (#8563)
* Relocate chart type and dataset type defaults

* Update types

* Separate overrides and descriptors

* Update derived sample, use merge for inherit

* Don't merge overrides

* Review update
2021-03-06 10:34:52 -05:00