Commit Graph

1072 Commits

Author SHA1 Message Date
Ben McCann
6feb48b5ef
Allow ESM files to be used in Node.js (#10479)
Allow ESM files to be used in Node.js
2022-07-30 11:25:23 -04:00
Slava Terekhov
a26ca0aca7
docs: add docs for changing from time scale to logarithmic/linear scale (#10527) 2022-07-30 11:14:33 -04: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
Jacco van den Berg
1fef75d990
Skip all borders if borderSkipped === true (#10530)
* Skip all borders if borderSkipped === true

This will allow you to skip all borders (not just one side) if you set borderSkipped to boolean true and so allow you to have a consistent legend marker even for bars without borders. Reason is that even if same colored borders are set there are artifacts that make the bar look bad and also even with inflateAmount the bars do look good when big but when only a few pixel in size they start to look bad too so this was the only way for me to make it work so legends are looking good and bars too.

* fix failing test, update docs and typings

* update typing comment

Co-authored-by: Istvan Petres <pijulius@users.noreply.github.com>
2022-07-30 08:12:53 -04:00
Jacco van den Berg
c6120f9e71
Improve docs radial linear grid (#10518)
* make link work in github itself

* fix dead link on reload or new tab

* document the props for radial grid

* remove extra chart and space
2022-07-27 22:16:32 +02:00
Peter Hauke
02ad43a5cc
Fix Stack Overflow tag: chart.js (#10522)
* Fix Stack Overflow tag: chart.js

The same fix as accepted in: #10520

The correct Stack Overflow tag name is chart.js and not chartjs

* Fix Stack Overflow tag: chart.js

The same fix as accepted in: #10520

The correct Stack Overflow tag name is chart.js and not chartjs
2022-07-27 20:17:01 +02:00
Jukka Kurkela
a4114e84d9
parsing: support dot(s) in object keys (#10517) 2022-07-26 08:30:52 -04:00
stockiNail
144a6c0c27
Enable borderDash option in the grid as scriptable (#10519) 2022-07-26 08:28:15 -04:00
Jacco van den Berg
de3596d4af
Fix dead link on reload or open in new tab (#10515)
* make link work in github itself

* fix dead link on reload or new tab
2022-07-25 15:45:52 +03: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
Jacco van den Berg
eeba91e0de
make link work in github itself (#10497) 2022-07-20 12:51:50 -04:00
Jacco van den Berg
97351d1b5d
update typing of clip, allow it to be configurable in the options for typescript (#10494) 2022-07-20 12:51:22 -04: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
Igor Lukanin
1ccafe7d8f
Add a stale version warning + a link to the latest version of docs (#10446)
* Add a stale version warning + a link to the latest version of docs

* Update docs/.vuepress/config.js

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

* Shorten the warning

* Revert master title

* Revert master title

Co-authored-by: Jacco van den Berg <jaccoberg2281@gmail.com>
2022-07-18 06:48:41 -04:00
Andrew Lyndem
cf6e1d2354
Update integration.md (#10470)
Fixed grammatical error on line 93
2022-07-07 07:15:09 -04:00
Igor Lukanin
88f9665954
Enforce maximum width on chart editor blocks in the docs (#10447)
* Enforce max width on chart editor blocks

* Shrink the chart view rather than the whole chart editor
2022-06-29 16:38:00 +03: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
Hossein Pourbahrami
b52507b5c7
Typo fix (#10410) 2022-06-08 07:51:17 -04:00
stockiNail
a0609d77ff
Fix default value of 'includeInvisible' option in the documentation (#10400) 2022-06-06 10:04:33 -04:00
Jacco van den Berg
7b01d33fed
clarify api docs (#10392) 2022-06-01 14:38:39 -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
linkviii
4183b7f04a
Add links to docs in all the samples (#10308) 2022-05-21 11:02:13 -04:00
Evert Timberg
5c3dc932b6
Enable configuration of radial scale point label border radius (#10293) 2022-04-15 18:31:09 -04:00
Evert Timberg
a39f694184
Allow time scale to offset using skipped ticks (#10278) 2022-04-03 16:05:43 -04:00
Evert Timberg
43889f247c
Document tooltip draw hooks and only call hooks when the tooltip draws (#10276)
* Document tooltip draw hooks and only call hooks when the tooltip draws

* Update tests
2022-04-03 10:09:46 -04:00
Akira Aso
16f6b8cb41
Fix a typo in data-structures.md (#10259)
Change `The provides labels can be` to `The provided labels can be`.

Co-authored-by: Akira Aso <44665462+akiorange@users.noreply.github.com>
2022-03-31 08:08:21 -04:00
Jacco van den Berg
4c42bd0919
Correct chart initialization flow (#10266)
* update flow chart to reflect correct flow

* Update drawio file
2022-03-31 08:08:00 -04: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
Jacco van den Berg
9568a315d2
Update link to filler plugin (#10250) 2022-03-20 19:59:12 -04:00
Adam Parkin
6a6693e26d
Update animations.md (#10184)
Fix broken link to animations sample.
2022-02-22 08:37:33 -05:00
Jacco van den Berg
6c129267f8
remove hardcoded licenseYear in docs (#10158) 2022-02-14 04:26:22 +02:00
Jacco van den Berg
c80b1450f5
update link to license and bump license year (#10156)
* update link to license and bump license year
* another license year bump
2022-02-13 11:27:29 -05:00
Evert Timberg
759a56c3a5
Document scale update plugin hooks (#10154) 2022-02-13 10:22:12 -05:00
Jacco van den Berg
ed68557a99
Make object notation usable for polarArea and radar (#10088)
* start to make object notation usable for polarArea
* enable object notation also for radar chart, test default key
2022-02-12 10:23:31 -05:00
Talla2XLC
7c14ab74aa
Add new align 'inner' for X axis (#10106)
* Add new align for X axis

new align 'left-right' for options.scales['x'].ticks namespace will allow users to aling ticks: 'start" for first (left) tick and 'end' for last (right) tick

* corrected name of aligment to "inner", documentation and add test for inner labels

* delete unnecessary changes

* corrected logic for reverse axis, add tests for reverse axis and withoutY axis

* corrected chart paddings for "inner" tick align

* code clearness

* Update types/index.esm.d.ts

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

Co-authored-by: Talla2XLC <alexey.ivanov@epc.com.ru>
Co-authored-by: Jukka Kurkela <jukka.kurkela@gmail.com>
Co-authored-by: Jacco van den Berg <39033624+LeeLenaleee@users.noreply.github.com>
2022-02-12 10:07:00 -05:00
Jacco van den Berg
7d3a1b874c
Sort docs sub menus alphabetically, add line and plugin sample (#10138)
* add sample plugin for doughnut empty state

* Add commented out sample, order sub cats alphabetically
2022-02-06 15:11:53 -05:00
Evert Timberg
cb81592989
Allow spanGaps to be specified on LineOptions (#10133) 2022-02-06 15:11:02 -05:00
stockiNail
56661e448d
Sort line and bubble dataset options alphabetically (#10100)
* Sort line and bubble dataset options alphabetically
* moves drawActiveElementsOnTop to general section
2022-02-01 07:50:19 -05:00
Dimitri Papadopoulos Orfanos
a7d98fb1a0
Fix typos found by codespell (#10103) 2022-01-27 09:24:55 -05:00
Jacco van den Berg
4d918f5afa
add typing and docs for maxTicksLimit all scales (#10057)
* add typing and docs for maxTicksLimit time scale

* change maxTicksLimit to base  instead of each scale seperatly since its done in the core.scale
2022-01-11 15:57:35 -05:00
Cyril Auburtin
cb1fd3fca7
typo Cofiguration (#10045) 2022-01-04 11:43:59 -05:00
Jacco van den Berg
2970e70858
Docs/Add sample for centered point labels (#10013)
* Add sample for centered point labels

* update chart title

* link to sample for more clarity from property
2021-12-22 15:59:58 +02:00
t-mangoe
961533c115
Add centerPointLabels option for linear radial scale (#9949)
* center point labels to slices in polar chart

* remove unnecessary comments

* put the code together in one line

* fix the code according to the code review

* Undo changes related to the createContext function

* add documentation and types.
2021-12-21 20:27:07 +02:00
Doug Brunner
977a4b8d85
Docs/clarify usage of ticks callback (#9991) (#9994)
* Docs/clarify usage of ticks callback (#9991)

* Docs/Fixed inconsistent variable names (#9991)

Co-authored-by: Doug Brunner <doug@epicycloidengr.com>
2021-12-16 07:34:30 -05:00
Jacco van den Berg
30bebefc40
Types/ type suggestedMin and suggestedMax for time scale (#9986)
* type suggestedMin and suggestedMax for time scale

* implement feedback
2021-12-14 13:41:47 -05:00
Jacco van den Berg
0a5c058d7a
Types/Allow min-max as string timescale (#9985)
* allow for string in time scale min max config

* add min-max type to docs

* typo
2021-12-14 11:50:37 -05:00
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