Commit Graph

4119 Commits

Author SHA1 Message Date
Jacco van den Berg
4a9f446ff5
Docs/clarify samples (#9960)
* add information to the samples root about using the samples

* Implement review feedback
2021-12-06 07:39:33 -05:00
Josh Kelley
d83f0467da
Improvements to tooltip positioners (#9944)
* Improve positioner types; allow overriding xAlign and yAlign

* More type improvements; pass in Chart as third parameter

* Expose chart as part of TooltipModel

I initially passed the Chart element as the third parameter to the positioner; however, Scale and LegendElement elements expose `this.chart`, and sample code for positioners used `this._chart`, so documenting the chart member and giving it a public name seems to make more sense.

* Update documentation

* Fix documentation

* Fix issues from code review
2021-12-06 07:39:06 -05:00
Josh Kelley
957ca837d5
Specify UTC time zone for the test suite (#9945)
The controller.bar/not-grouped/on-time test was failing on my computer because the date ranges happen to cross the end of Daylight Saving Time in the U.S., so chart was generated with one more hour of time than the test fixture expected.

Using moment-timezone to specify a fixed time zone with no DST seemed like the most robust fix. (Alternatively, I could pick a date range that doesn't change DST; that ought to work.)
2021-12-06 07:38:39 -05:00
Jukka Kurkela
4ac11a7208
Try to improve documentation for new users (#9952)
* Try to improve documentation for new users
* Review update
2021-12-05 12:42:52 -05:00
Jacco van den Berg
e7aec8c301
add beforeDestroy hook (#9933)
* add `beforeDestroy` hook
* add documentation of destroy lifecycle, add `afterDestroy` hook and deprecate destroy
2021-12-05 09:05:18 -05:00
Jacco van den Berg
d1daf1ac08
allow for multiline labels in tick callback (#9937) 2021-12-05 08:57:44 -05:00
Luuk de Vlieger
7784fbfded
Support "r" axis for non-intersecting interaction (#9919)
* Support "r" axis for non-intersecting interaction

* Extract some interaction functionality

* Remove whitespace and semicolons

* WIP: add interaction test

* Update documentation

* Fix test

* Add another test

* Update axis params

* Add additional axis check to binary search

* Update axis type
2021-12-05 08:57:07 -05:00
Jacco van den Berg
6d3a1c5fa6
Feature/active elements on top (#9920)
* add flag to draw active items on top

* add documentation and types

* remove redundent check

* added test

* resolve linting errors

* increase tollerance

* remove axes for better test, hope no tolerance needed
2021-12-05 08:56:53 -05:00
Jukka Kurkela
cd9d5289a4
Add borderJoinStyle option for arc elements (#9877)
* Add borderJoinStyle option for arc elements
* docs + types
* Consistently enumerate the possible choices
2021-12-05 08:56:37 -05:00
Jukka Kurkela
9fa26f9247
Bump version to 3.6.2 (#9953) 2021-12-05 08:41:45 -05:00
Jukka Kurkela
6552a01265
Stop modifying options in interaction handlers (#9939)
* Stop modifying options in interaction handlers
* Don't use object spread
2021-12-01 17:55:58 -05:00
Jukka Kurkela
db995af158
Fix resolver caching issue when setting values (#9938) 2021-12-01 17:53:55 -05:00
Evert Timberg
688cd470e9
Bump to 3.6.1 (#9929) 2021-11-30 13:14:49 -05:00
Jukka Kurkela
42e85942a8
Add notes about more specific options for axes (#9923) 2021-11-30 07:43:46 -05:00
Jukka Kurkela
f10fab6591
Fix tooltip caret position when it is positioned at the corners (#9922)
* Fix tooltip caret position when  at the corners

* Add test

Co-authored-by: Dirk Gausmann <di.gaus@gmx.de>
2021-11-30 00:02:00 +02:00
Jukka Kurkela
93452501d1
Category: Track automatically added labels (#9921)
* Category: Track automatically added labels

* Use correct yAxisKey (does not change anything)
2021-11-29 23:38:11 +02:00
carsonalh
5e5339d01c
Update stale documentation for axis titles (#9683)
* Update stale documentation for axis titles (#9682)

Updated the documentation for the types on axis labels.

In the corresponding `index.esm.d.ts` file, put JSDoc descriptions for
the properties to match the now-updated documentation.

* Clean up axis title labels documentation (#9682)

Inserted extra information in the documentation for the type of the
padding, inserted missing full stops.

In the type file, added JSDoc for undocumented properties.

* Update docs/axes/labelling.md

* Update types/index.esm.d.ts

Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>
2021-11-29 23:37:34 +02:00
Evert Timberg
67aa6eb985
Add a note about the type parameters of the ChartData type (#9917) 2021-11-28 13:01:14 -05:00
Evert Timberg
f8992a6168
Doughnut chart options have an offset property (#9916) 2021-11-28 13:01:00 -05:00
Evert Timberg
7cbc47becc
Chart area boxes receive 0 margin during the final layout process (#9915) 2021-11-28 10:25:27 -05:00
Jukka Kurkela
bccb1276f0
Detect detach/attach in same observation (#9876)
* Detect detach/attach in same observation

* Missing `!`, better tests

* reduce duplication
2021-11-27 21:46:00 +02:00
Dmitriy Fishman
1107073a98
Fix a typo in index.md (#9900)
Fix a typo
2021-11-25 08:19:26 -05:00
Dmitriy Fishman
26ca35f8b4
Update contributing.md (#9893) 2021-11-25 08:10:12 -05:00
Igor Lukanin
51762aece5
docs: Add a link to front-end integrations (#9866) 2021-11-17 18:04:22 -05:00
Jukka Kurkela
838d40b2c8
Synchronize data visibility with data changes (#9857)
* Synchronize data visibility with data changes

* avoid babel spread bug

* Simpler?

* one more

* simple enough, cc?
2021-11-18 00:13:31 +02:00
Jukka Kurkela
0c5db4973e
Fix inRange for full circle arc (#9871)
* Update misleading sample comment

* Fix inRange for full circle arc
2021-11-18 00:10:19 +02:00
Jukka Kurkela
0dc733a96c
Configure all datasets before updating any (#9872)
* Update misleading sample comment

* Configure all datasets before updating any
2021-11-18 00:09:25 +02:00
Jukka Kurkela
6bc47d3cea
Update misleading sample comment (#9865) 2021-11-17 07:34:00 -05:00
Jukka Kurkela
c8b885dd3e
Prevent proxying CanvasGradient in Node platform (#9861) 2021-11-15 20:09:43 -05:00
Jacco van den Berg
6c63f7a01b
Types: add autopadding to typing (#9858)
* add autopadding to types

* fix failing test
2021-11-15 23:23:51 +02:00
Jukka Kurkela
e43730eb4d
Fix incomplete TS type for Chart.register + others (#9855) 2021-11-15 12:56:56 -05:00
Jukka Kurkela
2988a6c6dc
Fix type linting and indent errors (#9843)
* Fix type linting and indent errors
* Properly indent comments too
2021-11-11 15:00:52 -05:00
NorthBlue333
7da77a560e
update animation event to include currentStep instead of currentState (#9837) 2021-11-11 18:54:17 +02:00
Jacco van den Berg
359d171683
update animation event to include inital variable (#9834) 2021-11-11 07:20:48 +02:00
Ben McCann
7966227df3
Pass number format to tooltip (#9831) 2021-11-10 16:02:42 -05:00
Jacco van den Berg
681ada552e
Docs/update scale position type (#9812)
* update type of scale position in docs, add explanation sentence to object position

* improve clarification

* grammar/spelling
2021-11-07 21:31:31 +02:00
Eric Theise
67c5a85144
Define with let to avoid "assignment to constant" errors (#9803)
* Define with let to avoid "assignment to constant" errors

Thanks for this example. Defining `label` with `const` rather than `let` results in `Uncaught TypeError: Assignment to constant variable.`

* Another case where const needs to be replaced with let.

* Requested cases where const needs to be replaced with let +1 (style).
2021-10-30 09:23:14 -04:00
Jukka Kurkela
1749e57918
Remove scriptability from defaults.font types (#9794)
* Remove scriptability from defaults.font types

* Remove failing test
2021-10-29 07:32:12 -04:00
Jacco van den Berg
10106e4ec6
Fix object notation border width barchart (#9800)
* make object available for bar as border Radius

* override only the bar borderWidth prop

* spacing
2021-10-26 08:50:07 -04:00
Jukka Kurkela
2a97192154
New sample: Progressive Line With Easing (#9798) 2021-10-26 07:49:04 -04:00
Jacco van den Berg
9039053049
change namespace and chart types that override legend defaults (#9791) 2021-10-25 19:48:51 +03:00
Evert Timberg
2f4962f750
Add warning about chart types overriding plugin defaults (#9787) 2021-10-24 12:14:37 -04:00
Evert Timberg
40e88ba45c
Bump to 3.6.0 (#9784) 2021-10-23 13:21:28 -04:00
Josh Kelley
aac0bef060
Fix cleaning up metasets (#9656)
* Fix cleaning up metasets

I believe it's a mistake to only delete the metaset if it has a valid controller; see f191f2f5 for where this behavior was introduced.

This is a minimal fix for #9653; as discussed there, it may also be worth updating `updateHoverStyle`.

As of #7030, `this._metasets` should always be defined, so checking whether it's undefined is no longer necessary.

* Add a test covering metaset behavior

* Add a regression test for #9653; fix `toHaveSize` usage

* Fix test failure
2021-10-23 18:46:33 +03:00
gautammsuthar
1199415e25
Added hyperlink on Chart.js LOGO (#9741)
Inserted a hyperlink on chart.js logo 
So that users can easily be redirected to the HOME PAGE of the web application
2021-10-16 15:55:14 -04:00
Atharva Deshpande
30e66bc50e
Fix: Typo 'is less' -> 'are lesser' (#9755)
* Fix: Typo 'is less' -> 'are lesser'

* Update plugin.decimation.js
2021-10-16 22:41:27 +03:00
Oscar Dominguez
12d5e4c7e7
ci(workflow): add cache to workflows using actions/setup-node (#9757)
* ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows

* style(workflows): restore single quotes and remove unnecessary 'null'
2021-10-16 22:18:11 +03:00
Jukka Kurkela
6a250de81d
Add chart, p0.raw, p1.raw to segment context (#9761)
* Add chart, p0.raw, p1.raw to segment context

* Types
2021-10-15 15:56:29 -04:00
mikidoodle
6c220748db
Fixed 4 links (#9720)
* Update linear.md

* Update padding.md

* Update padding.md

* Update padding.md

* Update padding.md

* Update padding.md

* Update padding.md

* Update padding.md

* Update padding.md

* Update padding.md

* Padding.md links work now

* Decimation plugin links work now

* Three links work now

I’ve made the Specify a rotation value and ticks.sampleSize links work.

* Update linear.md
2021-10-15 22:36:53 +03:00
Jukka Kurkela
18fc9760e1
Fix stacked fill with lines over multiple scales (#9767) 2021-10-15 08:00:14 -04:00