Commit Graph

17 Commits

Author SHA1 Message Date
Evert Timberg
c5dcf5a20d
Update chart extension docs + add samples (#8540)
* Update docs on chart extensions
* Working sample for derived chart types
* Add derived axis example
* Remove duplicated line
2021-02-28 16:02:44 -05:00
Jukka Kurkela
0955a2590e
Improve radial gradient sample (#8383)
* Improve radial gradient sample
* Add hover
2021-02-05 07:54:52 -05:00
LeeLenaleee
c3fbe5efc3
Fix/area fill and chart titles (#8113)
* fixed fill for area chart stacked and title for charts where it wasn't in plugins yet
* Chart defined in utils
* added radar skip points example in the overview to go to
2020-11-30 09:59:20 -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
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
Jukka Kurkela
986f72f933
Rename dist/Chart* to dist/chart* (#7416)
* Rename dist/Chart* to dist/chart*
* Add a note to migration docs
* Review update
2020-05-25 16:54:22 -04:00
Evert Timberg
fa174551c4
Ensure all samples use correct scale options (#7147) 2020-02-22 14:33:39 -05:00
Jukka Kurkela
bfe34214ac
Use ResizeObserver and MutationObserver to detect detach/attach/resize (#7104)
* Use Resize/MutationObserver to detect detach/attach/resize
* Cleanup
* Review update
* Restore infinite resize detection (#6011)
2020-02-17 11:00:03 -05:00
Ben McCann
9c5a1aabce
Simplify financial sample (#7070) 2020-02-08 08:10:20 -05:00
Ben McCann
47c7a42aae Improved financial sample (#6998)
* Improved financial sample
* Switch from adapter to moment
* Use data instead of cached timestamps
2020-01-26 15:35:53 -05:00
David Winegar
1ad5f369af Allow switching platforms (#6964)
Allow switching platforms

Move the Chart.platform to Chart.platform.current instead, and add
ways to see available platforms and set the current platform. This
is necessary for adding tests that use the "basic" platform.
2020-01-26 15:33:20 -05:00
Evert Timberg
95ba11a427
Add radial and linear gradient sample files (#6666)
* Add radial gradient sample file
* Add linear gradient sample file
2019-11-01 07:20:37 -04:00
Simon Brunel
55128f74c1 Move CSS in a separate file to be CSP-compliant (#6048)
In order to be compatible with any CSP, we need to prevent the automatic creation of the DOM 'style' element and offer our CSS as a separate file that can be manually loaded (`Chart.js` or `Chart.min.js`). Users can now opt-out the style injection using `Chart.platform.disableCSSInjection = true` (note that the style sheet is now injected on the first chart creation).

To prevent duplicating and maintaining the same CSS code at different places, move all these rules in `platform.dom.css` and write a minimal rollup plugin to inject that style as string in `platform.dom.js`. Additionally, this plugin extract the imported style in `./dist/Chart.js` and `./dist/Chart.min.js`.
2019-02-08 19:06:04 +01:00
Simon Brunel
b7139dbbef Use Chart.min.js in samples (#5958)
Samples are supposed to show good practices and in most cases we don't use the time scale but require `Chart.bundle.js`, which is not correct. Instead, we should require the non-bundled version in its minified version (`Chart.min.js`). Paradoxically, time based examples don't use `Chart.bundle.js` but require moment manually side to `Chart.min.js`, which IMO is also the correct way since it allows users to configure and use moment globally (TZ, locales, etc.) and doesn't enforce a specific moment version.

Also remove the `data-labelling.html` example because we now have an [official plugin](https://github.com/chartjs/chartjs-plugin-datalabels) that implements this feature and don't want to deal with user custom code anymore.
2019-01-06 09:56:58 -05:00
Bart Deslagmulder
858d86eebb Add label for first dataset in progress-bar example (#5625)
While the second dataset already has a label ("My Second dataset") the first dataset showed "undefined" as a label. Added a label to the first dataset object.
2018-07-09 20:27:43 +02:00
Loïc Bourgois
182270ef9b Setup HTML and JS linters for samples (#5195) 2018-02-03 13:28:54 +01:00
Simon Brunel
6e57405a0a Reorganize samples and list them in index.html (#4043) 2017-03-20 20:40:44 -04:00