Commit Graph

16 Commits

Author SHA1 Message Date
Jukka Kurkela
b83f64b16e Rewrite animation logic (#6845)
* Rewrite animation logic

* Review update 1

* Review update 2

* Review update 3

* Add 'none' to api.md
2019-12-27 17:13:24 -05:00
Evert Timberg
374b7491a3
Allow axes to be centered on the chart area (#6818)
Allow axes to be centered on the chart area or at a dynamic position based on another axis
2019-12-16 18:17:42 -05:00
Jukka Kurkela
931d686adb Float bars: data as objects (#6739)
Float bars can be specified in object data points
2019-11-15 08:40:45 -05:00
Evert Timberg
2354e2ff6b
Allow functions to be specified for scale grid line options (#6700)
Add scriptable options for scale styling
2019-11-12 07:03:00 -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
jatiny17
ae7a3c27a3 Adding title for the axes (#6571)
Create sample to show how to add an axis title
2019-10-31 18:14:37 -04:00
Jon Rimmer
f3b18373e6 Add onLeave callback to legend (#6059) 2019-02-24 10:58:22 +01:00
Janelle deMent
58d7891ba2 Add examples of scriptable charts (#6042)
* Add example of scriptable pie chart
* Add example of scriptable line chart
* Add example of scriptable polar area chart
* Add example of  scriptable radar chart
2019-02-13 21:12:52 -05: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
Simon Brunel
ae80e14c51
Make bar styling options scriptable (#5780)
The bar `backgroundColor`, `borderColor`, `borderWidth` and `borderSkipped` options are now scriptable (unit tests, docs and a basic sample). Also fix the gulp task that generates the documentation on Windows.
2018-11-12 21:15:37 +01:00
Xingan Wang
333f2eba99 Fix scale options update (#4198)
- allow options to be updated in-place or as a new object
- re-merge new options and rebuild scales & tooltips
- preserve reference to old scale if id/type not changed
- related tests and new sample also added.
- update document about options update
- update doc and example
2017-11-29 22:52:23 +01:00
Ben McCann
fb4357ea91 Add a financial time series sample (#4554) 2017-09-10 10:54:12 +02:00
Simon Brunel
872dfec0f3 Introduce scriptable options (bubble chart) (#4671)
New `options.resolve` helper that determines the final value to use from an array of input values (fallback) and a given context and/or index. For now, only the bubble chart support scriptable options, see documentation for details.

Add scriptable options documentation and update the bubble chart dataset properties table with their scriptable and indexable capabilities and default values. Also move point style description under the element configuration section.
2017-08-24 09:34:38 +02:00
Joe B. Lewis
ecac839f68 Fix broken link to point to correct sample file. 2017-04-15 09:27:27 -04:00
Simon Brunel
6e57405a0a Reorganize samples and list them in index.html (#4043) 2017-03-20 20:40:44 -04:00