Commit Graph

2519 Commits

Author SHA1 Message Date
Simon Brunel
d284686452
Make Chart.Animation/animations/Tooltip importable (#5382) 2018-04-02 10:55:52 +02:00
Evert Timberg
9fbac88938 Add ticks.precision option to linear scale. (#4841)
If defined and `stepSize` is not specified, the step size will be rounded to this many decimal places.
2018-04-01 18:56:45 +02:00
Juan Eugenio Abadie
a191921b15 Fix typo in the legend documentation (#5348) 2018-03-20 15:37:56 +01:00
Evert Timberg
25f26346d5
Time Point Data sample works correctly (#5328) 2018-03-13 18:52:19 -04:00
Sean Sobey
7f4b1d9715 Add undefined guard for window.devicePixelRatio (#5324) 2018-03-10 16:57:27 +01:00
Pierre GIRAUD
d0b26dbddd Show how to use circumference and rotation options (#5326) 2018-03-10 16:56:27 +01:00
Akihiko Kusanagi
b7025fedbe Add a link to chartjs-plugin-streaming to extensions.md (#5309) 2018-03-02 20:13:41 -05:00
Simon Brunel
ac088a04ab Bump version to 2.7.2 (#5307) 2018-03-01 16:20:53 -05:00
jcopperfield
c2a5b12376 Bugfix: Improve polyfill function of log10 to return whole powers of 10 (#5275)
* Bugfix: Improve polyfill function of log10 to return whole powers of 10
        as integer values, as it caused endless loop in IE11 in the tick
        creation loop.

* Compare floating-point numbers directly instead of using unnecessary division.
2018-02-20 18:44:01 -05:00
Wilson Lin
c90cf2ebcd Make both README.md and installation.md clearer (#5274)
Address the ambiguity of "Selecting the Correct Build" section
2018-02-20 13:29:10 +01:00
Winter Zhong
be6660c63d Improve title of generated documentation (#5256) 2018-02-15 19:25:49 -05:00
Laura Cressman
d6ce5c0772 Support multiple font colors for radial chart labels (#5240)
* Support multiple font colors in array

* Address linting error
2018-02-14 21:22:19 -05:00
Michael
584d1c646c Fix label vertical alignment on vertical scales (#5248) 2018-02-09 23:20:06 +01:00
Ben McCann
bba29e5916 Remove trailing spaces from docs (#5227) 2018-02-04 12:27:50 +01:00
Loïc Bourgois
182270ef9b Setup HTML and JS linters for samples (#5195) 2018-02-03 13:28:54 +01:00
stockiNail
97ff45873e Add Charba GWT integration to extensions.md (#5225) 2018-02-02 10:17:24 +01:00
Simon Brunel
c268185953 Fix Slack invitation link (#5217)
Setup a new Heroku app based on rauchg/slackin, using Slack legacy token from the Chart.js (chartjs.slack@...) user and reCAPTCHA from the same Google account.
2018-01-31 19:35:08 -07:00
Jackson Haenchen
e61392a256 Don't draw tick across axis/border (#5178) 2018-01-28 18:59:22 +01:00
Jonathan Quach
98ef3942d9 Fix variable name error on developer api documentation for (#5173) 2018-01-27 15:47:51 +01:00
Evert Timberg
274fca68c9
Update custom tooltip documentation and samples (#5166) 2018-01-21 16:47:50 -05:00
Evert Timberg
f82c8adf39
Remove copy-pasta error in polar area and doughnut chart docs (#5169) 2018-01-21 16:47:25 -05:00
Evert Timberg
d668882971
Tooltip label callback example (#5168) 2018-01-21 16:47:04 -05:00
Evert Timberg
9a0117ad49
Responsive printing docs (#5167) 2018-01-21 16:46:28 -05:00
Evert Timberg
26c44cf7ab
Treat negative values in doughnut charts as positive (#5165) 2018-01-21 12:12:33 -05:00
Loïc Bourgois
6d58a6a8a8 Add tests related to showLines for controller.scatter (#5150) 2018-01-16 10:29:49 +01:00
Loïc Bourgois
e585c7505f Log gulp error to Chart.js (#5143)
* Log errors and skip for buildTask

* Write gulp error to Chart.js
+ Add intentional error to core to check if travis fails

* Remove unused require

* Remove error + Proper require fs

* Fix newline

* Refactor

* Put back browser errors

* Use options

* Fix intentional error

* Use yargs + Refactor

* remove space

* Fefactor

* Use booleans
2018-01-13 12:17:38 -05:00
Ben McCann
37ec8384d7 Format the label in the time scale tooltip (#5095) 2018-01-13 10:39:16 -05:00
Simon Brunel
2d7f0a46c3 Fix updating plugin options (#5144)
Cached plugin descriptors hold a reference on the plugin options, which break if the plugin options object is replaced. That case happens when the user updates the plugin options with a new object, but also since the new config update logic (#4198) that now always clones the plugin options. The fix consists in explicitly invalidating that cache before updating the chart.
2018-01-13 08:23:50 -05:00
Simon Brunel
2f5a3e171b Ignore package-lock.json (#5138) 2018-01-11 06:51:03 -05:00
Simon Brunel
1d5619d6d4
Fix GitBook error with the shared ESLint config (#5133)
`gitbook-cli install` failed when trying to fetch eslint-config-chartjs because of the way it was installed (ie. using the GitHub repository URL). The shared config is now published on npmjs: https://www.npmjs.com/package/eslint-config-chartjs
2018-01-11 09:03:16 +01:00
Simon Brunel
6bea15e7cf
Rename Chart.layout to Chart.layouts (#5118)
Chart.layouts seems more consistent with other service names (Chart.plugins, Chart.scales, etc.) but also more inline with the service which handle many layout (one per charts).
2018-01-09 14:12:40 +01:00
Simon Brunel
fb3ea03440
Make Chart.plugins importable (#5114)
Explicitly deprecate (since 2.1.5) `Chart.Legend` and `Chart.Title`.
2018-01-08 11:48:59 +01:00
Simon Brunel
ce27fe5ea6
Make Chart.layout(Service) importable (#5113)
Rename (and deprecate) `Chart.layoutService` to `Chart.layout` and make it importable.
2018-01-07 23:38:26 +01:00
Simon Brunel
9ddb449ad1 Use the Chart.js shared ESLint config (#5112)
An ESLint shareable config has been created (from this repository) in the attempt to homogenize Chart.js hosted projects and plugins style. Rename `.eslintrc` files to `.eslintrc.yml` since the name has been deprecated.

Fix the CC badge (maintainability) and disable CodeClimate ESLint plugin because it doesn't support custom shareable config but also because it already executes relevant checks as part of the regular process.
2018-01-06 17:59:13 -05:00
Ben McCann
33c7d941f7 Add back Chart.Ticks.formatters (#5088) 2018-01-06 18:59:47 +01:00
Simon Brunel
fcd463354b
Update license year and copyright holders (#5053) 2017-12-31 15:17:22 +01:00
Cameron Childress
9874a754e0 Adding helpful note about legendCallback (#5094)
I didn't realize you had to call generateLegend() manually and a quick search tells me that lots of other people have run into this too.
2017-12-29 08:52:17 +01:00
jcopperfield
92d033beb2 Optimization: prevent double ticks array reverse for vertical logarithmic axis (#5076)
with ticks option 'reverse: true'.
2017-12-23 08:34:55 -05:00
Boyi C
ce1fc28b74 Improve point.xRange and point.yRange performance (#5062) 2017-12-18 20:24:02 +01:00
jcopperfield
b04ce949d1 Use time.unit option to create default min/max for empty chart (#5045) 2017-12-15 18:10:30 +01:00
jcopperfield
f9beedba40 Fix issue #5029 (#5041)
- infinite loop in generating time axis, due to insufficient bounds checking.
2017-12-14 10:03:07 -05:00
jcopperfield
f0bf3954fe Fix issues #4572 and #4703 (#4959)
- issue #4572: logarithmic type if all numbers are zero browser crashes "Out of memory"
 - issue #4703: [BUG] Browser unresponsive on bubble chart with logarithmic axes
2017-12-12 18:43:51 -05:00
jcopperfield
4e47c178e4 Fix tooltip animation when target changes while animating (#5005)
* Fix issue #4989
 - tooltip in 'index' mode doesn't animate smoothly.

* Change: different approach for smooth tooltip animation in 'index'
        mode, when target doesn't change.

* Fix: jslint error

* Fix: remove spyOn pivot from test

* Add: setAnimating-flag in transition used to set on tooltip.transition
     to keep track of tooltip animation.

* Decrease code complexity

* Revert transition and complexity changes
Add: use 'tooltip._start' as workaround check for tooltip animation status
2017-12-12 18:43:17 -05:00
jcopperfield
6f34b2224f Fix issue #4928: linear tick generator doesn't round values to needed precision. (#4943)
* Fix issue 4928
 - linear tick generator doesn't round values to needed precision.

* Improve: replace toPrecision() in toString() to improve readability.

* Fix: logarithmic tick generator doesn't round values to needed precision.

* Fix: rounding tick values didn't work for negative values.

* Add: Core ticks tests
2017-12-02 09:24:57 -05:00
Simon Brunel
15d1056b53
Implement equally sized bars (#4994)
When `barThickness: undefined|null` (default), we compute an optimal sample size based on the smallest tick interval reduced to prevent any bar to overlap (bar equally sized). Also added support for a special `barThickness: 'flex'` value (previous default) that globally arranges bars side by side to prevent any gap when percentage options are 1 (variable bar sizes).
2017-12-02 12:38:36 +01:00
JohnShaft
b835df02cd Add Angular2+ libraries for Chart.js in docs (#5006) 2017-12-01 18:56:49 +01:00
beiz23
9a7182ba36 Fix typos and broken links in the docs (#5010) 2017-11-30 14:41:32 +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
jcopperfield
42d3d91f52 Fix issue #4441 - y-axis labels partially hidden due to restrictive initial fitting. (#4942)
* Fix issue 4441:
 - y-axis labels partially hidden due to restrictive initial fitting.

* Add regression test to linear scale

* Moved regression test from linear scale to core layout service
2017-11-25 08:28:57 -05:00
Jean-Philippe Sirois
e2dd4483c7 Add an Ember.js Integration in the Documentation (#4984) 2017-11-24 19:31:58 -05:00