Commit Graph

23 Commits

Author SHA1 Message Date
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
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
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
Evert Timberg
06fa8a4c98
Update to test utils 0.1.2 to track font setting (#8325) 2021-01-18 07:40:18 -05:00
Jukka Kurkela
610461d714
Use provided options in tooltip plugin (#8254) 2020-12-31 08:46:23 +02: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
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
Dan Manastireanu
6869a41d40
feat: Draw tooltips with point styles. Closes #7774 (#7972)
* feat: Draw tooltips with point styles. Closes #7774

* chore: Add tooltip usePointStyle docs

* chore: Add tests and visual tests for tooltip usePointStyle

* chore: Update typescript with tooltip usePointStyle
2020-10-29 22:55:40 +02:00
Evert Timberg
c68ec57672
Reduce tooltip implied padding at top and bottom edges of the canvas (#7908)
* Allow the tooltip to get closer to the canvas edge

Closer to the top & bottom by considering (height/2) instead of height.

* Update missing options in TS types

* Remove unneeded brackets
2020-10-18 16:51:48 +03:00
Evert Timberg
a8a83d12cd
Provide APIs to set active (hovered) and tooltip elements. (#7845)
Provide APIs to set active (hovered) and tooltip elements.

Chart.setActiveElements will set the hovered items.
Chart.tooltip.setActiveElements will set the tooltip items.
2020-10-05 17:14:38 -04:00
Ben McCann
426d8debba
Tooltip: add dataPoint and rename value to formattedValue (#7618)
* Tooltip: add dataPoint and rename value to formattedValue
* Add a test
2020-07-14 17:40:32 -04:00
Ben McCann
30e197742d
Align the tooltip callbacks parameters with scriptable options (#7603)
Align the tooltip callbacks parameters with scriptable options
2020-07-12 18:26:13 -04:00
Jukka Kurkela
7024aad38f
PluginService using registry (#7590)
PluginService using registry
2020-07-11 18:08:45 -04:00
Ben McCann
919e50b9fc
Generate ticks from small to large (#7559)
* Generate ticks from small to large
* Add note to migration guide
2020-06-29 07:52:28 -04:00
Ben McCann
2ca155cce1
Add parameters to tooltip filter option (#7556) 2020-06-29 07:51:20 -04:00
Evert Timberg
ba5c9e01c6
Update tooltip when the display position changes (#7469) 2020-06-25 13:51:34 -04:00
Jukka Kurkela
59a1af91ac
Replace horizontalBar with indexAxis: 'y' (#7514)
* Replace horizontalBar with indexAxis: 'y'
* Fix drawing of line for last x-position
* Consistently determine axis of scale
* Add test
2020-06-18 17:35:52 -04:00
Jukka Kurkela
ebccf225b9
Alter test to require fever iterations (#7426) 2020-05-26 18:10:28 -04:00
Jukka Kurkela
5a83a80811
Move font* to font.* (#7383) 2020-05-21 17:07:06 -04:00
Jukka Kurkela
b05699eec5 Clean up after test (#6976)
* Clean up
* Make sure the event is inside chart are
2020-01-21 15:43:41 -05:00
Evert Timberg
5aaff3a1aa
Convert Tooltip to a plugin (#6990)
* Convert Tooltip to a plugin
* code review feedback
* Update docs. Convert positioners map to be on the plugin directly
2020-01-21 06:36:53 -05:00