Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility with chart.js 2.0 #123

Closed
krrokkx opened this issue Jun 7, 2015 · 37 comments
Closed

Compatibility with chart.js 2.0 #123

krrokkx opened this issue Jun 7, 2015 · 37 comments

Comments

@krrokkx
Copy link

krrokkx commented Jun 7, 2015

Not compatible with chart.js 2.0. Compatibility is needed since in chart.js there are significant performance improvements and fix of proper support for negative values in the bar chart.

@bischofs
Copy link

bischofs commented Jun 9, 2015

+1 Lack of simple things like multiple Y axis that are updated in Chart.js 2.0 would be very usefull in this directive. Can anyone create a fork to try to integrate the new Chart.js?

@Sljux
Copy link

Sljux commented Jun 16, 2015

+1

1 similar comment
@gadeynebram
Copy link

+1

@jtblin
Copy link
Owner

jtblin commented Jun 17, 2015

2.0 is still alpha and only released 2 weeks ago: https://github.com/nnnick/Chart.js/releases/tag/2.0.0-alpha3. I'll probably start looking into it soon-ish, happy to consider a PR if someone is willing to. I haven't looked at what the breaking changes are yet.

@george3447
Copy link

+1

2 similar comments
@adandan01
Copy link

+1

@ksitarek
Copy link

ksitarek commented Aug 6, 2015

+1

@jtblin
Copy link
Owner

jtblin commented Aug 8, 2015

As per https://github.com/nnnick/Chart.js/tree/v2.0-dev, it isn't ready yet.

Version 2.0 is in early alpha. We are changing the internal data model to reduce copying, increase performance and expose a more flexible API

Repository owner locked and limited conversation to collaborators Aug 8, 2015
@jtblin jtblin mentioned this issue Sep 7, 2015
@jtblin jtblin mentioned this issue Dec 10, 2015
@jtblin
Copy link
Owner

jtblin commented Dec 10, 2015

FYI I've started working on this last weekend and I will continue this one and push a branch with what I have then.

@jtblin
Copy link
Owner

jtblin commented Jan 31, 2016

Those interested into 2.0 support should try out chartjs-2.0 branch. Most of the homepage examples now work properly. I had to disable the realtime ticks chart as it was using too much cpu.

Here are some of the major and breaking changes:

  • all options need to have chart prefix e.g. chartData. The other ones were deprecated for quite some time anyway.
  • no more legend attribute as it is now a Chart.js option which is enabled by default so it can be disabled via options.legend.display
  • chartColours have been renamed to chartColors.

You should be able to test the examples by opening examples/charts.template.html. Need to download Chart.js beta-2 and put it at the root of the directory.

I'd appreciate feedback and issues with this new version. Please prefix issues with chartjs-2.0 in the title.

Repository owner unlocked this conversation Jan 31, 2016
@thundo
Copy link

thundo commented Feb 19, 2016

Good job @jtblin for supporting a beta version. Would it be possible to have an updated dist for this branch?

Thank you

ps I see now that this comment is a duplicate of #305.

@jtblin
Copy link
Owner

jtblin commented Feb 20, 2016

I've now updated the dist for the branch. Chart.js dependency is also updated in bower (not released to npm yet) so all dependencies can be retrieved via bower normally now.

Remaining items (non exhaustive):

@jtblin
Copy link
Owner

jtblin commented Feb 20, 2016

Opened chartjs/Chart.js#2040 for tracking the realtime chart performance problem.

@jtblin
Copy link
Owner

jtblin commented Feb 20, 2016

I've now updated the dist for the branch. Chart.js dependency is also updated in bower (not released to npm yet) so all dependencies can be retrieved via bower normally now.

However I recommend using the latest Chart.js in v2.0-dev branch for better performance and latest fixes: https://github.com/nnnick/Chart.js/blob/v2.0-dev/dist/Chart.js

@thundo
Copy link

thundo commented Feb 21, 2016

Very nice, thank you for the dist and the direct improvement of the library.
I'll give it a run to the bleeding edge branch in the next few days.

@jtblin
Copy link
Owner

jtblin commented Mar 12, 2016

All tests now pass with Chart.js 2.0 branch. I've now published a 1.0.0-alpha1 version, see https://github.com/jtblin/angular-chart.js/tree/chartjs-2.0 for more info and breaking changes.

@PedroCassettari
Copy link

Hy dudes.

Is it possible combine bar chart and line chart with Chart.JS 1.0?

Thanks!!

@jtblin
Copy link
Owner

jtblin commented Mar 16, 2016

Not with Chart.js 1.0, it's possible with Chart.js 2.0 but not yet with angular-chart 1.0.0-alpha1. See #336.

@niemyjski
Copy link

@jtblin can we merge this into master? 2.0 will be released shortly and all of there efforts are on 2.0 which means people should start the migration to 2.0. We can tag the current stable and release minor versions if we have to in a tag/branch for 1.x.

@jtblin
Copy link
Owner

jtblin commented Mar 27, 2016

@niemyjski until chart.js 2.0 is merged into master and published, there is no point doing so. The current deployed version of chart.js 2.0 beta dates from Dec-28 and there have been many changes since then so the version that will be picked by bower misses a lot of bug fixes, performance improvements, etc.

Moreover I may have more breaking changes that I want to release as part of 1.0. For example I just removed the call to scope.apply() on mouse hover.

Latest version is published to npm as 1.0.0-alpha3 with all the latest changes e.g. y-axis support and cherry-pick of master changes.

@niemyjski
Copy link

@jtblin Were working on getting it merged in.

@niemyjski
Copy link

@jtblin chartjs 2.0 has been released :)

@jtblin
Copy link
Owner

jtblin commented Apr 15, 2016

I've published a new version 1.0.0-alpha4 using latest Chart.js 2.0.0. I still have one test failing in Travis that I'd like to fix but I should release as stable pretty soon.

  • Fix travis ci build
  • Fix CDN deliver missing css

@jtblin jtblin added the v1.x label Apr 15, 2016
@ramarro123
Copy link

Hi,

what about giving the option to better config all the params on dataset?

imagine making a chart with a filled line and a plain line, it will be
dataset[{fill:false,data:blabla},{fill:true,data:bubu}]

at the moment it's not possible to configure PER dataset attributes, just the global params via
chart-options

maybe adding another props like "datasetProps" that take an array of objects that will (at each index) extends the dataset? just wondering :)

i am thinking to all the various options, including mixing dashed chart with standard, changing the tension (i have to chart a squared wave, and tension have to be 0 and an analog sin wave, with of coruse a bit of tension to make it nicer and smooth)

hope that you understand my shitty english guys ;)

@sankotm
Copy link

sankotm commented Apr 26, 2016

Hey,
thanks for making it compatible with Charts.js 2.0. Stacked Bar/Line graphs is what I needed. I have them almost running as I'd need. What I miss is a legend bellow showing names of series and their colors. Is it possible to show them ?

(on angular-chart.js StackedBarExample, they are not there http://jtblin.github.io/angular-chart.js/examples/stacked-bars.html
and in Chart.js 2.0 sample, they are displayed, so it should be possible to do https://github.com/chartjs/Chart.js/blob/master/samples/bar-stacked.html)

@sankotm
Copy link

sankotm commented Apr 26, 2016

Ah, found it:

$scope.options = {
    legend: {
        display: true,
        position: 'bottom'
    }
}

I couldn't find it in readme (there is just a note that chart-legend was removed). It may be handy to add a note there about how to enable it in options.

@elvisbegovic
Copy link

elvisbegovic commented Apr 28, 2016

Hello,

  1. I use the last chartjs and the angular-chartjs 2.0 support but when I resize my Chrome the chartLine is duplicated why this ? you can see here : http://g.recordit.co/s2w01tnCSB.gif

  2. I have another problem: now I commented this line to get works my chart but if I don't comment I have this error Chart.js:3724 Uncaught TypeError: easingFunction is not a function

ps: may be because of option "animation:true" when I delete it it works fine ?!?!?!

  1. I use attribute chart-colors of the line directive with this scope value
    var color = [ { 'fillColor': "rgba(91, 200, 84,.1)", 'strokeColor': "rgba(91, 200, 84,.5)", 'pointColor': "rgba(91, 200, 84,.01)", 'pointHighlightStroke': "rgba(91, 200, 84,0.5)", 'pointStrokeColor': "rgba(91, 200, 84,0.01)", 'pointHighlightFill': "#fff" },{ 'fillColor': "rgba(71, 160, 220,0.3)", 'strokeColor': "rgba(71, 160, 220,1)", 'pointColor': "rgba(71, 160, 220,1)", 'pointHighlightStroke': "rgba(71, 160, 220,0.8)", 'pointStrokeColor': "#fff", 'pointHighlightFill': "#fff" },{ 'fillColor': "rgba(206, 120, 255,0.1)", 'strokeColor': "rgba(206, 120, 255,1)", 'pointColor': "rgba(206, 120, 255,1)", 'pointHighlightStroke': "rgba(206, 120, 255,0.8)", 'pointStrokeColor': "#fff", 'pointHighlightFill': "#fff" },{ 'fillColor': "rgba(255,0,0,0.2)", 'strokeColor': "rgba(255, 0, 0,1)", 'pointColor': "rgba(250, 0, 0,1)", 'pointHighlightStroke': "rgba(250, 0, 0,0.8)", 'pointStrokeColor': "#fff", 'pointHighlightFill': "#fff" } ];

But my colors aren't applied in this v2 support but in v1 support it works fine ... thanks in advance

@jtblin
Copy link
Owner

jtblin commented May 3, 2016

@istiti please open separate issues with repro steps.

@nirre7
Copy link

nirre7 commented May 23, 2016

@ramarro123 There is a PR in the works that should suit your needs #391

@jtblin
Copy link
Owner

jtblin commented Jun 18, 2016

@jtblin
Copy link
Owner

jtblin commented Jun 21, 2016

I've now published 1.0.0-beta1 which adds support for bubble charts and a few other things. That means I am not planning to do any major (breaking change) to the API for now. Given it has been in alpha for quite a while, I am not expecting the beta to last for too long before I merge to master. Probably just 1 or 2 weeks from now. Sorry it took way longer than expected.

@arjundevarajan
Copy link

Is the ability to adjust axes to nonlinear scales possible? (i.e. logarithmic, exponential, etc.)

@Olmer1st
Copy link

Hi,
what version of Chart JS supported?

@jtblin jtblin closed this as completed in 0c16199 Jul 19, 2016
jtblin added a commit that referenced this issue Jul 19, 2016
Fix #123 and #428

# Conflicts:
#	.dockerignore
#	.travis.yml
#	Dockerfile
#	README.md
#	angular-chart.js
#	angular-chart.less
#	bower.json
#	dist/angular-chart.css
#	dist/angular-chart.js
#	dist/angular-chart.js.tar.gz
#	dist/angular-chart.min.css
#	dist/angular-chart.min.css.map
#	dist/angular-chart.min.js
#	dist/angular-chart.min.js.map
#	examples/charts.html
#	examples/charts.template.html
#	gulpfile.js
#	package.json
#	test/fixtures/coverage.js
#	test/test.unit.js
@brunoserralheiro
Copy link

Error: Chart.js library needs to included, see http://jtblin.github.io/angular-chart.js/
It was working fine, and then this.

What is the matter, anyway?

@jtblin
Copy link
Owner

jtblin commented Aug 10, 2016

And then what? I don't understand you mate.

@mackelito
Copy link

mackelito commented Sep 1, 2016

When running bower install on "angular-chart.js": "1.0.1" it seems to lack Chart.js
Perhaps it needs the merged file?

@qiluo
Copy link

qiluo commented Sep 2, 2016

I ran into same problem when I was trying to load the page

ReferenceError: require is not defined
<anonymous>   chart.js:4

Error: Chart.js library needs to included, see http://jtblin.github.io/angular-chart.js/
<anonymous>   angular-chart.js:23

I installed angular-chart by bower.

I found a workaround, add below into your own project bower.json

"overrides": {
    "chart.js": {
      "main": "dist/Chart.bundle.js"
    }
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests