* 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
* 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>
* 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
* 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>
* 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>
* 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>
* 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>
* 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>
* 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.