Commit Graph

15 Commits

Author SHA1 Message Date
Jukka Kurkela
f4792306e0 Remove global from defaults (#6893) 2020-01-03 14:07:38 -05:00
Jukka Kurkela
ce74eb76a1 Convert axis options from arrays to objects (#6773)
* Convert axis options from arrays to objects

* Updated all chart type defaults
* Throw errors when axis type or position are not specified
* Avoid raising unnecessary errors when merging options into the default configs

* Fix additional tests

* Ensure scale defaults are set if type is not explicitly defined

* Another step

* Include `scale` as `firstIDs.r`

* update docs

* Update for buildOrUpdateScales

* Update migration guide

* Add test back
2019-11-21 18:46:49 -05:00
Jukka Kurkela
4feaea925f Small chores (#6740)
* Remove duplicate code
* Migrate `xLabel` and `yLabel` from docs & samples
2019-11-13 19:04:56 -05: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
Loïc Bourgois
182270ef9b Setup HTML and JS linters for samples (#5195) 2018-02-03 13:28:54 +01:00
Evert Timberg
274fca68c9
Update custom tooltip documentation and samples (#5166) 2018-01-21 16:47:50 -05:00
Ben McCann
50e2ba953d Use https to load scripts from CDN in samples (#4255) 2017-05-13 17:24:00 +02:00
ellie
c96ad66945 Update line-customTooltips.html (Re issue #4038 )
Add window scroll position to tooltip position calculation so they show up in the intended place instead of potentially off-screen! Moved tooltips inside the canvas parent container since they are being positioned in terms of its location
2017-03-22 06:35:50 -04:00
Simon Brunel
6e57405a0a Reorganize samples and list them in index.html (#4043) 2017-03-20 20:40:44 -04:00
Marcelo Tedeschi
f97cab12b1 Refactored drawCaret and drawBackground functions to draw the background together with the caret in the same path 2017-02-24 19:27:05 -05:00
Marcelo Tedeschi
af11be3ce4 Added possibility to draw tooltip borders 2017-02-24 19:27:05 -05:00
etimberg
74d4dbc608 X and Y interaction modes now use the intersect option 2016-11-05 08:19:07 -04:00
Josh Soref
67934920be Spelling fixes (#3522)
Including: actually, aspect, bottom, changes, characters, datasets, divisible, downward, guidelines, instance, instances, interrupted, item, javascript, label, lifecycle, lines, plugins, manually, milliseconds, nearest, occurring, position, predefined, recalculate, tooltip, those
2016-10-27 21:18:31 +02:00
Evert Timberg
80bd08bef9 Update chartColors.js to utils.js and move randomScalingFactor function there 2016-10-23 16:33:25 -05:00
etimberg
9ad9cd2154 Reorganized sample files into sub directories. Added a helper containing colours that should be used by all samples.
I added new samples to explain behaviour and modified all samples to have consistent styling. In updating the samples,
I removed the use of jQuery and instead use standard methods.

For the custom tooltip samples, I updated the styling to show color boxes like the regular tooltips.
2016-10-23 16:33:25 -05:00