Commit Graph

25 Commits

Author SHA1 Message Date
Evert Timberg
d2c8402445
Scriptable title plugin options (#8764) 2021-04-01 10:16:03 +03:00
Jukka Kurkela
cfd9c98575
Option resolution with proxies (#8374)
* Option resolution with proxies

* Remove plugin fallback to root options/defaults

* Update core plugins, reduntant font fallbacks

* Add some notes
2021-02-15 14:42:32 -05:00
Jukka Kurkela
ddfbcf777a
Update eslint-config-chartjs to v0.3.0 (#8406) 2021-02-10 08:21:39 -05:00
Jukka Kurkela
ad84d285d8
Rename LayoutItem.fullWidth to fullSize (#8358) 2021-01-31 13:44:44 -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
Evert Timberg
988b3c5d2b
Create standardized text render method (#8227)
* Create standardized text render method
* Document renderText options and enable configurable decoration width
* Add tests for font rendering
* Split color definition to it's own file
* renderText supports setting styles
* Mock context needs to track textBaseline
* renderText can set textAlign and textBaseline
* renderText does not mutate the context + translate/rotate
* Explicitly set the text decoration style
* Move useStroke logic into renderText
* Cartesian scale: Update computeLabelItems to avoid duplicate allocations
2020-12-26 11:23:02 -05:00
Jukka Kurkela
78dbeea1f0
Add new hooks for plugins (#8103)
* Notify beforeUpdate on disabled plugins

cc?

cc2

cc3

typo

* init, unInit, enabled, disabled

self review :)

update the new hook signatures to unified

merge error

* Review update

* start/stop, cc

* types, jsdoc

* stop between destroy and uninstall
2020-11-28 22:57:45 +02:00
Jukka Kurkela
913a01a3a6
Move title, tooltip and legend to options.plugins (#8089)
* Move title, tooltip and legend to options.plugins

* Update tooltip.md

* Update legend.md and title.md

* Add migration notes

* typo

* Types

* Restore plurals

* One more s, restore tabs

* All plugins disabled

* lint

* cc
2020-11-25 08:50:12 +02:00
Jukka Kurkela
ddc72fcfbb
Align font options with CSS (#8066)
* Align font options with CSS

* Review comments
2020-11-19 20:59:24 +02:00
Jukka Kurkela
e756fb93a3
Resolve fonts through options.font (#7674)
* Resolve fonts through options.font
* Remove defaultRoutes from Tooltip fonts
2020-08-03 12:32:58 -04:00
Jukka Kurkela
7024aad38f
PluginService using registry (#7590)
PluginService using registry
2020-07-11 18:08:45 -04:00
Jukka Kurkela
5a83a80811
Move font* to font.* (#7383) 2020-05-21 17:07:06 -04:00
Jukka Kurkela
a9ae64f1e2
Stop leaking fonts (and fillStyle) to ctx (#7150) 2020-02-23 13:08:01 -05:00
Evert Timberg
5f6c3df6dc
Title alignment options (#6908)
* Add alignment options for title plugin.

Alignment can be set to 'start', 'center'. or 'end'. A new sample has been added as well.

* Update sample file title
2020-01-05 14:59:57 -05:00
Ben McCann
ecb0784f0d Remove minSize (#6910) 2020-01-05 10:42:42 -05:00
Jukka Kurkela
f4792306e0 Remove global from defaults (#6893) 2020-01-03 14:07:38 -05:00
Ben McCann
d932f9c56e Remove deprecated code from index.js (#6623)
Remove deprecated code from index.js
2019-10-28 07:03:39 -04:00
Ben McCann
ce8ee02ccd Reduce indentation by reversing if check (#6497) 2019-09-07 10:56:15 -04:00
Akihiko Kusanagi
c457b506b8 Normalize angle for index in radialLinear scale (#6177) 2019-04-02 10:25:37 +02:00
Akihiko Kusanagi
d29ec5a485 Add scale.pointLabels.lineHeight and scale.ticks.lineHeight options (#5914) 2018-12-20 09:56:06 +01:00
Simon Brunel
fb3ea03440
Make Chart.plugins importable (#5114)
Explicitly deprecate (since 2.1.5) `Chart.Legend` and `Chart.Title`.
2018-01-08 11:48:59 +01:00
Simon Brunel
090196c07c Add support for line height CSS values (#4531)
The title plugin and scale title now accept lineHeight specified using unitless value (1.4), length ('1.4em' or '12px'), percentage ('200%') or keyword ('normal' === 1.2). The line height parsing has been refactored under the 'Chart.helpers.options' namespace. Also fix incorrect text positioning in the title plugin.

https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
2017-07-20 19:20:54 +02:00
etimberg
de0ea5c6ba Multiple lines of text in the chart title 2017-06-19 07:07:35 -04:00
Simon Brunel
f0c6b3f834 Fix legend and title layout options update 2017-04-29 11:38:42 -04:00
Simon Brunel
f3816b560c Move legend and title in the plugins folder (#4076) 2017-03-25 18:28:54 +01:00