angular-nvd3

Line Graph using D3 is not starting from the date i want it to

让人想犯罪 __ 提交于 2019-12-11 10:55:20
问题 Below is my line graph where I am using 2 lines to show different values, One line is blue and the other is red. however the red line i want to start from 'Dec 27'(half way of the graph) instead of the start of the graph. I have been looking ways to do this but honestly I'm not sure how I can. if someone is able to show me how i would appreciate that a lot. Thanks you in advance! This is my css: path.line { fill: none; stroke: #004ecc; stroke-width: 4px; } path.line2 { fill: none; stroke:

angularjs nvd3 multibar chart xAxis tick not showing

為{幸葍}努か 提交于 2019-12-11 06:37:16
问题 I'm using angularjs nvd3 multibar chart chart xAxis tick do not show like below. I want to show all xAxis tick formed %Y/%m/%d %H:%M This is my code. this.$scope.options = { chart: { type: 'multiBarChart', height: 450, margin : { top: 20, right: 20, bottom: 60, left: 65 }, x: function(d){ return d[0]; }, y: function(d){ return d[1]; }, color: d3.scale.category10().range(), duration: 300, stacked: true, clipEdge: true, clipVoronoi: false, xAxis: { axisLabel: 'Time', tickFormat: function(d) {

Load JSON Data into Angular-nvD3 Graph (AngularJS)

半世苍凉 提交于 2019-12-05 05:31:16
问题 I want to load encoded JSON Data retrieved with queries from a database into an Angular-nvD3 graph but I don't know how to do it or which way is the best to accomplish such task. I retrieve encoded JSON data with queries from a database (table PRODUCTS) with an api. I have already successfully loaded such data into tables with $http requests (loaded into a factory) to the given api. The data is saved as an object into a dictionary in a factory with $http requests to the api (located in

Angular-nvD3 Bar Chart y-axis Scaling Bug (AngularJS)

早过忘川 提交于 2019-12-04 14:05:07
问题 I have an application that creates one discrete bar chart. For some reason that I can't explain (which seems to be an internal error in the library), the y-axis scales to a data value which ISN'T THE HIGHEST VALUE of integers in the array (in my array, it scales to 5674 instead of 25797). How can I fix this bug? Thank you. Sample of my data (fetched-data.json): [{"0":"1","1":"323","ID":"1","STOCK":"323"},{"0":"2","1":"1401","ID":"2","STOCK":"1401"},{"0":"3","1":"5674","ID":"3","STOCK":"5674"}

Load JSON Data into Angular-nvD3 Graph (AngularJS)

徘徊边缘 提交于 2019-12-03 20:58:08
I want to load encoded JSON Data retrieved with queries from a database into an Angular-nvD3 graph but I don't know how to do it or which way is the best to accomplish such task. I retrieve encoded JSON data with queries from a database (table PRODUCTS) with an api. I have already successfully loaded such data into tables with $http requests (loaded into a factory) to the given api. The data is saved as an object into a dictionary in a factory with $http requests to the api (located in services). Sample of the table (table PRODUCTS): ID STOCK 1 100 2 275 Sample of the factory: .factory(

How to resolve an error like: TypeError: Cannot read property 'length' of undefined in angular nvd3 discrete bar chart?

我的未来我决定 提交于 2019-12-02 10:13:18
I am using angular nvd3 discrete bar chart, i am fetching values from $http and showing in the discrete bar chart, chart showing my value properly but i am getting an error like TypeError: Cannot read property 'length' of undefined how can i resolve this error? below is my code: <!DOCTYPE html> <html ng-app="plunker"> <head> <meta charset="utf-8" /> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.9/angular.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-nvd3/1.0.5/angular-nvd3.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5

AngularJS nvD3 Error - What versions are compatible?

我与影子孤独终老i 提交于 2019-12-02 09:36:11
问题 I have the same problem as with this user: Angular nvD3 Error: Invalid isolate scope definition for directive nvd3 The answer there said "use the latest angularjs" beyond Angular 1.1.4....but I am using the latest AngularJS!! AngularJS v1.6.7 What could I be doing wrong? 回答1: Works with this setup <link rel="stylesheet" href="//unpkg.com/nvd3/build/nv.d3.css"/> <script src="//unpkg.com/angular/angular.js"></script> <script src="//unpkg.com/d3@3/d3.js" charset="utf-8"></script> <script src="/

AngularJS nvD3 Error - What versions are compatible?

一曲冷凌霜 提交于 2019-12-02 04:24:28
I have the same problem as with this user: Angular nvD3 Error: Invalid isolate scope definition for directive nvd3 The answer there said "use the latest angularjs" beyond Angular 1.1.4....but I am using the latest AngularJS!! AngularJS v1.6.7 What could I be doing wrong? Works with this setup <link rel="stylesheet" href="//unpkg.com/nvd3/build/nv.d3.css"/> <script src="//unpkg.com/angular/angular.js"></script> <script src="//unpkg.com/d3@3/d3.js" charset="utf-8"></script> <script src="//unpkg.com/nvd3/build/nv.d3.js"></script> <script src="//unpkg.com/angular-nvd3/dist/angular-nvd3.js"><

Convert SVG to image in PNG

无人久伴 提交于 2019-11-30 09:54:13
问题 i am converting angular nvd3 chart to svg using html2canvas and canvg plugings but when i convert pie chart to png then i looks same as chart but when i convert line chart or area chart then its background goes to black and some circle drown on image. My code is var svgElements = $("#container").find('svg'); //replace all svgs with a temp canvas svgElements.each(function () { var canvas, xml; // canvg doesn't cope very well with em font sizes so find the calculated size in pixels and replace

NVD3 Line chart tics wrongly aligned to grid when using datetype on xAxis

*爱你&永不变心* 提交于 2019-11-29 15:18:24
I am currently working with NVD3 using Angular Directive (angular-nvd3). I have a very simple line chart with very simple data. The problem I have encountered now is that my data is wrongly aligned with the Axis. Example plunker available here: http://plnkr.co/edit/jWEYt6?p=preview , I am using dates on my xAxis, which are parsed using d3 library: tickFormat: function(d) {return d3.time.format('%d/%m')(new Date(d))} Description: I would expect the xAxis labels to be correspondent to the grid. In the example you can clearly notice that the xAxis is not evenly devided (values: 06/11, 08/11, 11