Commit Graph

127 Commits

Author SHA1 Message Date
Muhammad Khalikov
0cbc292dc7
Refined grammar and updated overall .md documentation files (#11324) 2023-06-05 09:56:56 +02:00
Hubert Olender
287394e5e3 Update tooltip.md (#11154)
* Update tooltip.md

Add missing `'`

* Update tooltip.md

Improve textDirection text
2023-02-23 08:05:50 -05:00
leo2436
120b72eaae
Docs: fix tooltip model doc. (#11143)
Co-authored-by: Leo Chen <liang.chen@thoughtworks.com>
2023-02-15 08:13:24 -05:00
stockiNail
7f9bca6844
Add borderDash options to arc element (#11127) 2023-02-12 17:46:05 -05:00
Jacco van den Berg
916aa6e1ab
Remove override warning tooltips (#11110) 2023-02-02 14:50:11 +01:00
Jacco van den Berg
9a9ff6fdbd
Pointstyle false (#10886)
* fix-#10755

* none to false

* str to bool

* str to bool

* 10/10

* fix test

Co-authored-by: puneetkathar1 <puneetkathar1@gmail.com>
Co-authored-by: Puneet Kathar <73285338+puneetkathar1@users.noreply.github.com>
2022-11-18 13:14:47 -05:00
Dan Onoshko
718f46095a
docs: notes about html legend, tooltip and title (#10857)
* docs: notes about html legend, tooltip and title

* Update docs/configuration/legend.md

Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>

* Update docs/configuration/tooltip.md

Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>

* docs: notes about html legend, tooltip and title fix

Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>
2022-11-07 19:49:47 -05:00
Philippe Jaubert
b5f5f468d3
Update tooltip.md (#10813)
Fixed spawn closes before its content.
2022-10-19 15:13:34 +02:00
Rich
6b357a5965
docs: Fix typos (#10809)
* Spell "corresponding" correctly

* Spell "circle" correctly

* Spell "configuration" correctly
2022-10-19 14:02:20 +02:00
Amin Cheloh
7410a3c30e
docs: fix typos (#10763) 2022-10-07 09:56:07 -04:00
Dominic Jean
0edb2ac604
enable pointStyleWidth for all legend style (#10639) 2022-09-01 06:37:12 -04:00
Devesh Pal
74f50df250
Fix broken link (#10640) 2022-08-29 17:02:08 -04:00
Jacco van den Berg
432d1e6a60
move option to correct namespace (#10613)
* move option to correct namespace

* change plugin name from snake_case to camelCase
2022-08-22 22:44:04 +02:00
Jacco van den Berg
96633cc0f6
Documentation: how to add static typing to plugins (#10607)
* Add documentation on how to add static typing to plugins

* make the options optional

* Fix syntax
2022-08-22 21:20:35 +03:00
Jacco van den Berg
d09e424a0a
Use borderRadius for legend and remove fallbacks (#10551)
* Use borderRadius for legend

* re enable test

* fix lint

* add note in migration guide

* Update types/index.d.ts

Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>
2022-08-18 07:34:18 -04:00
Dan Onoshko
ffce0f9f18
feat: tooltip callbacks fallback (#10567)
* feat: tooltip callbacks fallback

* docs: review fixes
2022-08-18 09:03:12 +03:00
Slava Terekhov
f0be17c859
Add circular prop to arc element (#10405)
* feat: add circular prop to arc element draw actions
* test: add test for arc element with circular:false prop
* feat: add circular prop to Arc element options
* docs: add decriptiption for new Polar area chart prop
* docs: fix circular prop description
* docs: add info about arc element circular prop to elements docs
* docs: move circular prop from general options to styling
2022-07-30 11:08:38 -04:00
M4sterShake
3c56061622
Clarifying threshold requirement in the docs for decimation (#10516)
Co-authored-by: Max Borkowski <max.borkowski@lexisnexisrisk.com>
2022-07-25 15:44:17 +03:00
Jacco van den Berg
341f903f5b
document defaults for plugins (#10490) 2022-07-20 18:53:14 +02:00
Dominic Jean
5452502b8c
Add pointStyleWidth option for legend (#10412)
* add pointStyleWidth for legend

* add drawPointLegend to keep drawPoint signature
2022-07-18 06:49:08 -04:00
Jukka Kurkela
58e736a0b9
Update aspectRatio documentation (#10456) 2022-06-29 07:46:00 -04:00
Brian Ball
8ee0c5c9b4
Update responsive.md (#10415)
* Update responsive.md

* Update docs/configuration/responsive.md

Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>

Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>
Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>
2022-06-22 15:22:31 +02:00
Jacco van den Berg
3c3d53be5e
clarify helpers need to be imported when using bundlers (#10434) 2022-06-22 08:09:02 +02:00
stockiNail
a0609d77ff
Fix default value of 'includeInvisible' option in the documentation (#10400) 2022-06-06 10:04:33 -04:00
Yiwen Wang
ebcaff15c2
Add option to include invisible points (#10362)
* Add option to include invisible points

* Minor fixes

* Add doc for newly added option

* Fix typo

* Add test for newly added option

* Improve description of the new option

* Update docs/configuration/interactions.md

Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>

Co-authored-by: Yiwen Wang 🌊 <yiwwan@microsoft.com>
Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
2022-05-25 13:25:27 +03:00
Josh Kelley
c057c96693
Interaction functions (#10046)
* Refactor get...Items functions to take events rather than positions

To work toward exposing something like the get...Items functions.

* Switch getAxisItems to use optimizedEvaluateItems

optimizedEvaluateItems falls back to evaluating all items for unsorted items, and sorting / optimizing ought to be okay, so this ought to be equivalent.

* Performance

* Consolidate getRelativePosition

helpers.dom.js's getRelativePosition already had logic to handle ChartEvent vs. Event (as demonstrated by the `native` check within `getCanvasPosition`), so it's redundant for core.interaction.js to have its own `native` check.

Update `getRelativePosition` to use the same `native` check as core.interaction.js's version.  As best as I can tell, the ChartEvent's x and y are populated from `getRelativePosition`, so the previous `getCanvasPosition` was effectively just duplicating `getRelativePosition'`s work.  I added a test to verify this; it depends on a local, not-yet-submitted change in chartjs-test-utils' `triggerMouseEvent` to return the mouse event that it triggers.

* Add an API to refactor duplicate isPointInArea

* Rename and update JSDoc to prepare for making this public

* Give functions a consistent, generic interface

* Export functions for discussion

* Code review feedback

Add a non-null assertion, as requested in code review.

Add JSDoc to clarify that `getCanvasPosition` now expects a native `Event`, not a `ChartEvent`.  Add `@ts-ignore`; `getCanvasPosition` relied on some loose conversions between `Event`, `TouchEvent`, and `Touch` that would require several changes to make TypeScript happy.

* Code review feedback

Return the event directly, to speed up the code a bit.  Add JSDoc to help communicate its intent.  Update various comments.

* Finalize exports; add docs and TypeScript

* Update src/helpers/helpers.dom.js

* Update src/helpers/helpers.dom.js

Only thing needed actually is the update of chartjs-test-utils to 0.4.0

* Bump chartjs-test-utils dependency

To get supporting work from https://github.com/chartjs/chartjs-test-utils/pull/19

Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>
2022-03-24 09:02:30 -04:00
Adam Parkin
6a6693e26d
Update animations.md (#10184)
Fix broken link to animations sample.
2022-02-22 08:37:33 -05:00
Dimitri Papadopoulos Orfanos
a7d98fb1a0
Fix typos found by codespell (#10103) 2022-01-27 09:24:55 -05:00
Cyril Auburtin
cb1fd3fca7
typo Cofiguration (#10045) 2022-01-04 11:43:59 -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
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
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
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
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
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
PrashoonB
6f7e09540c
Changed var to const/let in the docs (#9744)
Changed var to const/let in the docs
2021-10-13 14:51:33 -04:00
Jukka Kurkela
e1ae5e6abf
Add layout.autoPadding option (#9716) 2021-10-04 14:01:10 -04:00
Jukka Kurkela
c3a53f06d7
Bar: fix too thick borders (#9678) 2021-09-25 07:52:03 +03:00
Evert Timberg
f5c9a656ef
Configurable tooltip box padding (#9625) 2021-09-06 09:13:21 -04:00
Iurii Golskyi
eab0554717
fix: broken link to cubicInterpolationMode (#9626)
* fix: broken link to `cubicInterpolationMode`
Elements -> Line configurations -> cubicInterpolationMode
* fix: broken link in Line Configuration
2021-09-05 16:31:00 -04:00
Evert Timberg
0cdadd2560
Enable per-corner border radius in tooltip (#9620) 2021-09-05 13:07:28 -04:00
Evert Timberg
e9ed186081
Update tooltip callback docs (#9618) 2021-09-04 14:07:24 -04:00
Evert Timberg
148114b03b
Add more details on legend sort function (#9524) 2021-08-08 16:51:56 -04:00
Jacco van den Berg
f0a53fd44e
Move pointStyle types and update plugin link&render chart (#9479)
* Place canvasElement on next line to keep table clean

* move typing to global location, update plugin page
2021-07-30 08:14:07 -04:00
stockiNail
3311377682
Adds HTMLCanvasElement as possible value for pointStyle option (#9458) 2021-07-23 08:26:49 +03:00
Jukka Kurkela
b32fb48574
Bar: add 'middle' option for borderSkipped (#9452)
* Bar: add 'middle' option for borderSkipped
* Split in 2
2021-07-21 07:13:45 -04:00
Nico-DF
b4dee5507c
Adding threshold option to decimation plugin (#9327) 2021-07-04 13:19:35 -04:00
Jukka Kurkela
ed73dce18b
Docs: describe catching events with plugin (#9296) 2021-06-20 13:11:30 -04:00
Jukka Kurkela
c6976e8975
New plugin: subtitle (#9294)
* New plugin: subtitle

* Fix naive error for multiple charts
2021-06-20 07:34:55 -04:00