Commit Graph

33 Commits

Author SHA1 Message Date
Jukka Kurkela
8d7d5571cf Update moment to 2.24 in samples (#6948) 2020-01-10 18:27:16 -05:00
Ben McCann
404c1a08c7 Fix broken config in log scatter sample (#6937) 2020-01-09 16:25:31 -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
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
7f97adf5a0 Move scale defining options up from ticks (#6738)
* Move scale defining options up from `ticks`
* Include `ticks.reverse` in v3-migration
2019-11-15 12:11:13 -05:00
Jukka Kurkela
fef2a13ef6 Update time combo sample (#6736) 2019-11-12 19:20:52 -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
Jukka Kurkela
fcf76c5edd Fix sample paths and include all options (#6712) 2019-11-08 19:59:26 -05:00
Ben McCann
99811328dc Make all ticks objects (#6645)
Make all ticks object
2019-10-31 18:45:13 -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
Jukka Kurkela
63b7bd7a5b Update deprecated constructors (#6647) 2019-10-30 18:41:40 -04:00
Jukka Kurkela
39d83eeae0 Fix scatter sample (#6627) 2019-10-28 18:08:52 -04:00
Ben McCann
9ff1c845f2 Bar options should not be defined on scale (#6249)
* Bar options should not be defined on scale

* Improve minimization

* Add tests

* Multiple datasets in test
2019-10-25 12:17:41 -04:00
Ben McCann
69a5082bd6 Make autoskip aware of major ticks (#6509)
* Make autoskip aware of major ticks
* Address review comments
* Fix codeclimate warning
* Add test for major and minor tick autoskipping
* Revert change for determining _majorUnit and fix sample
2019-10-19 16:13:04 -04:00
Ben McCann
e5c68e2c82 Fix data in financial sample (#6244) 2019-05-15 14:23:09 +02:00
Ben McCann
6a2d87f7bb Remove datapoint with duplicate timestamp in order to fix sample (#6169) 2019-04-01 17:30:58 +02:00
Ben McCann
30cb91d2eb Demonstrate multiple units on financial timeseries sample (#6119) 2019-03-28 07:56:37 +01:00
Ben McCann
0ac215b56a Improve financial sample tooltips and interactions (#6089) 2019-03-03 15:00:24 +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
Niladri Dutta
dfbb57468f Add 'parser' instead of deprecated 'format' in samples (#5769) 2018-10-16 23:12:51 +02:00
Tom Pullen
a9c4e377a7 Add color to financial time series sample (#5661) 2018-08-08 18:44:53 +02:00
Evert Timberg
25f26346d5
Time Point Data sample works correctly (#5328) 2018-03-13 18:52:19 -04:00
Loïc Bourgois
182270ef9b Setup HTML and JS linters for samples (#5195) 2018-02-03 13:28:54 +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
Aspaldiko
34709826cd Fix incorrect samples titles (#4914) 2017-11-02 13:51:36 +01:00
Ben McCann
fb4357ea91 Add a financial time series sample (#4554) 2017-09-10 10:54:12 +02:00
Andrew
2d7c1f0d2c Time axis tick formatting with major and minor units (#4268)
Working towards creating the TimeSeries scale, this PR adds formatting for major and minor ticks on axes.
2017-06-15 07:20:16 -04:00
Andrew
f7f177f5ad Implemented aligment by senior unit in time axis. (#4267)
Implemented alignment by major unit in the time scale. This allows showing the first tick of a larger unit like days in a special way and is part of the basis of the time series scale.
2017-05-29 18:40:10 -04:00
Ben McCann
50e2ba953d Use https to load scripts from CDN in samples (#4255) 2017-05-13 17:24:00 +02:00
Thomas Redston
35dcfe00b1 Time scale improvements to improve performance and reliability
* Make parseTime private
* start on fixing time scale
* Reimplement existing functionality
* Tidy tests
* Fix labels for non-linearly sized units

Months, quarters and years have non-constant numbers of seconds. A scale that's linear WRT milliseconds produces incorrect tick labels due to the label formatting losing precision (eg year labels lose month and day so a label of 2016-12-32 displays as 2016 instead of 2017).

* Re-implement tick generation

As in v2.5
2017-04-02 08:49:00 -04:00
Simon Brunel
6e57405a0a Reorganize samples and list them in index.html (#4043) 2017-03-20 20:40:44 -04:00
SAiTO TOSHiKi
64b5def774 Fix : samples (line-stacked-area.html & step-size.html) (#3717)
Fix : samples
line-stacked-area.html:Changed j-query code to javascript
step-size.html:Fixed buttons not working
2016-12-18 12:49:43 -05:00
Evert Timberg
80bd08bef9 Update chartColors.js to utils.js and move randomScalingFactor function there 2016-10-23 16:33:25 -05:00