Code Monkey home page Code Monkey logo

angular-chartjs's People

Contributors

davidkaneda avatar jakebresnehan avatar rortegax2 avatar t8g avatar txbm avatar wallin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angular-chartjs's Issues

component breaks when using uglify

Error: [$injector:unpr] Unknown provider: aProvider <- a <- cjsDoughnutDirective

This is probably caused by the way this component creates directives dynamically. ngAnnotate seems to ignore this script.

options are not applied to pie chart

My html:

<cjs-pie dataset="graphData" options="graphOptions" width="80px" height="40px"></cjs-pie>

controller code:
$scope.graphData = [ { value: 10, color:"#FFE" }, { value: 5, color: "rgba(0,0,0,0.5)" } ]; $scope.graphOptions = { animateRotate: false };

When I debug into chart js code, I found animateRotate property to be true.
I am using chart js version 1.0.1-beta.4

Issues installing via Bower and Grunt's wiredep

Running the command

bower install --save angular-chartjs

Adds

"angular-chartjs": "~0.1.1"

to my bower.json. The code which is retrieved by that version includes a bower.json file which sets the main property as follows:

"main": "angular-chartjs.js"

It should be:

"src/angular-chartjs.js".

Grunt's wiredep task uses the main property to determine the path to the files which should be added to my project's script includes. Since the path is wrong in the distributed version, this breaks the site.

I noticed that your bower.json in Github is correct, but I do not see any available releases to know what version number to request bower fetch in order to get the proper file.

Error: c[e] is not a function

Trying to implement the angular-chartjs.min.js in a project; received this error in my console log in Firefox. First part of the trace points to angular-chartjs.min.js:1:918. I can give further information via email. Directive attempting to be used is cjs-line.

asynchronous data question

Hi,

I am looking for additional information about async chart data. Specifically, I provide the chart data as a promise, and it seems the module is not waiting for the data promise to be resolved. The following errors is thrown to the js console as soon a the controller returns:

TypeError: Cannot read property 'length' of undefined
    at Object.Chart.Type.extend.buildScale (http://localhost:1509/bower_components/chartjs/Chart.js:2136:25)
    at Object.Chart.Type.extend.initialize (http://localhost:1509/bower_components/chartjs/Chart.js:2065:9)
    at Object.Chart.Type (http://localhost:1509/bower_components/chartjs/Chart.js:811:19)
    at Object.Chart.Type.extend.ChartType (http://localhost:1509/bower_components/chartjs/Chart.js:1014:18)
    at Chart.Type.extend.Chart.(anonymous function) [as Bar] (http://localhost:1509/bower_components/chartjs/Chart.js:1042:12)
    at postLink (http://localhost:1509/bower_components/ng-chartjs/dist/angular-chartjs.js:88:35)
    at http://localhost:1509/bower_components/angular/angular.js:7113:44
    at nodeLinkFn (http://localhost:1509/bower_components/angular/angular.js:6711:13)
    at compositeLinkFn (http://localhost:1509/bower_components/angular/angular.js:6105:13)
    at compositeLinkFn (http://localhost:1509/bower_components/angular/angular.js:6108:13) <canvas dataset="chartdata" segment-stroke-width="5" class="ng-isolate-scope" height="150" width="300" style="width: 300px; height: 150px;"> 

Is there anything else I need to do to make this work?

Thanks

Chart not updating

See http://plnkr.co/edit/pVkf78hh7pAA0u0BembR?p=preview for an example.

I can't get the data on a bar chart to update when the $scope.variable has updated. Unlike in the plunker in my Chrome app the labels update but the data doesn't, in the Plunker neither update even though the chart.update() function is called (see the console logging).

Can't use dynamic data

I noticed you have to essentially set a big "skeleton" object for it to work at all, and if you pull data using $http and update the scope variable, that Chart doesn't update. Seems like this should be a fundamental part of an Angular style charting directive.

Don't work with IE8 + excanvas polyfill.

The chartJS documentation, supports IE8 if you use excanvas.js.
So I imported it and in addition, I used your directive as attribute instead of element (

For some reason, this directive dont work in ie8, even with the polyfill. In ie8 console we got TypeError: Object doesn't support this property or method<:canvas autofit="false options="barOptions" dataset="report.barData" cjs-bar

Installing via Bower (lastest version) cannot find src file

Looks like bower.json needs to be updated to show the correct file.

It was this:
"main": "src/angular-chartjs.js

This fixed it:
"main": "src/js/main.js",

I'm happy to do a pull-request and submit this as well if this is how you'd like to proceed with the new hierarchy.

Legend template

Adding a legendTemplate parameter is not updating the legend at all. Is this supported?

setting scaleStepWidth dynamically?

I'm trying to set scaleStepWidth dynamically on a line graph (based on a maximum value in my dataset), and am having difficulty getting the chart to recognize that I've done so.

If I hard code a value for scaleStepWidth in the options object (plus scaleStepOverride=true and scaleSteps=20), the chart scales exactly as expected. If I try to set the chart options after I've received the dataset in the controller, then the chart appears to display using the default settings.

Is this happening because the view needs to be recompiled to reflect the changes to the options?

Bower support

Could you add bower support for easier installation at some point.

Thanks

How to show labels?

As chartjs have such setting:
label: {
visible: true
}
How here we should do ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.