Simon Brunel
4a5b5a0e7e
Enhance context acquisition on chart creation
...
Add support for creating a chart from the canvas id and prevent exceptions, at construction time, when the given item doesn't provide a valid CanvasRenderingContext2D or when the getContext API is not accessible (e.g. undefined by add-ons to prevent fingerprinting). New jasmine matcher to verify chart validity.
2016-10-16 08:25:13 -05:00
Evert Timberg
03735563f4
Improve Tooltip and Hover Interaction ( #3400 )
...
Refactored interaction modes to use lookup functions in Chart.Interaction.modes and added new modes for 'point', 'index', 'nearest', 'x', and 'y'
2016-10-03 16:05:21 -04:00
Simon Brunel
16bcd6adc5
Fix initial aspect ratio when not responsive
...
When responsive is false and no canvas height explicitly set, the aspectRatio option wasn't applied because of the canvas default height. Prevent the retinaScale method to change the canvas display size since this method is called for none responsive charts, but instead make the resize() responsible of these changes. Also, as discussed some time ago, moved most of the core.js logic into core.controller.js. Clean up the destroy process and make sure that initial canvas values are properly saved and restored.
2016-09-23 17:47:35 +02:00
Zach Panzarino
8207027743
Implement eslint changes proposed by @simonbrunel in code review
2016-09-15 12:49:11 +00:00
Zach Panzarino
2d2f475a7a
First round of eslint fixes
2016-09-14 18:05:19 +00:00
Evert Timberg
553b20dc44
Gracefully handle creating the chart with no config
2016-06-21 18:45:22 -04:00
Evert Timberg
959b4eedf6
Merge pull request #2716 from thebenedict/master
...
Make canvas element display: block by default, with config option to …
2016-06-06 10:14:59 -04:00
thebenedict
0b19689b00
style canvas element display: block by default
2016-06-06 17:05:44 +03:00
Aaron Ballard
7f70afe864
Added a reference to Chart within Chart for Issue #2483
2016-06-02 16:04:33 -05:00
Evert Timberg
600f5b9ba0
Improve core and polar area
2016-05-30 21:55:58 -04:00
dibsyjr1
5aa16a67c1
Fixed the generateLegend function
...
Fixed the generateLegend function to create the colour block next to the text instead of around it.
2016-04-13 16:03:08 +01:00
etimberg
01b88f19df
Clean up code climate style issues and formatting.
2016-02-14 17:06:00 -05:00
etimberg
f6951816a0
Improve joshing reporting. Added a JSHint config file.
...
Fixed JSHint warnings.
2016-02-13 20:12:26 -05:00
Tanner Linsley
eb01a0d6f8
Core helpers reference
2016-02-11 23:45:14 -07:00
Tanner Linsley
007d029837
Bundled builds
...
Possible usages are:
src/Chart.js (umd)
dist/Chart.js (ChartJS)
dist/Chart.min.js (ChartJS minified)
dist/Chart.bundle.js (ChartJS with Moment.js)
dist/Chart.bundle.min.js (ChartJS with Moment.js minified)
2016-02-11 21:29:26 -07:00
Tanner Linsley
f2780bb825
Browserify for easier UMD consumptions and vanilla builds
2016-02-11 20:30:53 -07:00
Evert Timberg
dfaf786e1a
Always show lines by default.
2016-02-02 20:14:59 -05:00
Evert Timberg
d16f4fc5ce
Add default font options
2016-02-01 21:06:54 -05:00
etimberg
95a172df06
Remove old and stuff. Use the correct color variable instead of window.color
2015-12-02 22:15:03 -05:00
Evert Timberg
3099d967da
Do not bind to touchend events. This is the same as v1.x
2015-11-11 21:21:25 -05:00
etimberg
2b057cf690
Merge remote-tracking branch 'origin/v2.0-dev' into v2.0-dev-tooltip-refactor
2015-10-18 18:17:39 -04:00
Evert Timberg
93ee8f85f6
Put comment back in correct spot
2015-10-12 09:19:14 -04:00
Evert Timberg
1232ca53f0
Fix a race condition in the resize listener & use the correct merged config object for the responsive setting
2015-10-12 09:16:49 -04:00
Tanner Linsley
ef5cec7f5e
Tooltips now using new lineArray format
2015-10-06 20:40:25 -06:00
Evert Timberg
4a093196b8
Don't increase canvas css size during a retina scale. Reset the canvas style exactly as it was set before during destroy. Ensure coordinates are translated over correctly into model coordinates. Fixed a bug during destroy when unscaling the canvas
2015-09-22 19:22:55 -04:00
Evert Timberg
39252d4633
Use hidden iframe to detect resize + obey max width when getting maximum size. Updated the bar sample to start off hidden. Use the 'show' button to display the graph
2015-09-20 10:30:12 -04:00
Evert Timberg
9474d72491
Revert "Fix resize problems when charts are initially hidden"
2015-09-19 17:52:58 -04:00
Evert Timberg
e6220f474b
Attempting to make resize better
2015-09-14 18:50:52 -04:00
Evert Timberg
0caa2a79ae
Legends for Line, Bar & Radar charts.
2015-07-05 14:47:56 -04:00
Tanner Linsley
63530ba66d
Better responsive sizing
2015-06-16 13:06:34 -06:00
Tanner Linsley
b0ece8b516
New controllers, bar drawing (with errors)
2015-06-15 14:36:02 -06:00
Tanner Linsley
d73dae09e7
No hardcoded chart type methods
2015-06-14 19:15:10 -06:00
Tanner Linsley
4047440acc
Git thinks the core file is new now haha
2015-06-14 18:10:00 -06:00
Tanner Linsley
3f9afb1f31
More core file separation, and no duplicate copyrights
2015-06-14 18:09:45 -06:00
Evert Timberg
886c99623f
Drop the base class in favour of an expanded canvas controller. Renamed 'chart' to 'chartInstance' in the controllers
2015-06-14 13:37:37 -04:00
Evert Timberg
68ae02263b
Fix the broken scatter chart. Introduced the concept of a canvas controller that goes along with the element controller.
2015-06-14 13:00:09 -04:00
Evert Timberg
9751e8f5b1
Created a generic base class to be used by rectangular charts. Modified Chart.Type.extend to put the parent's prototype in __super__. Moved more code into the controller and renamed the controller to RectangularElementController.
2015-06-14 10:35:59 -04:00
Evert Timberg
47b25d1c6d
Move linearRadial default config to be a property of the scale.
2015-06-13 14:16:01 -04:00
Evert Timberg
faa43d51a9
Category scale now has defaults. Updated the bar & line charts to use this new default.
2015-06-13 13:25:41 -04:00
Evert Timberg
3e4fce58fa
Clone handles arrays better
2015-06-13 13:22:28 -04:00
Evert Timberg
b5c69984e3
Change spaces to tabs throughout
2015-06-13 10:15:21 -04:00
Evert Timberg
6582e2ff06
Handle nesting better in the clone method so that we don't wipe out the line defaults when the scatter chart extends
2015-06-13 08:59:54 -04:00
Tanner Linsley
31643ee598
Support jQuery' or native canvas element as chart context
2015-06-13 02:41:15 -06:00
Tanner Linsley
1a3bb25f5c
Reverse that :)
2015-06-13 02:13:38 -06:00
Tanner Linsley
181a61f16a
Do not update involuntarily on resize. Only render.
2015-06-13 02:08:55 -06:00
Tanner Linsley
e1237feb97
File structure for extensibility
2015-06-12 16:08:27 -06:00