Comments (8)
Can you show me your js and html code?
from angular-nvd3.
html code is:
<nvd3 options="options" data="data"></nvd3>
and controller has the following code:
$scope.options = {
chart: {
type: 'multiBarHorizontalChart',
height: 300,
margin: {
top: 20,
right: 20,
bottom: 60,
left: 55
},
x: function(d) {
return d.name;
},
y: function(d) {
return d.label;
},
showControls: true,
showValues: false,
transitionDuration: 500,
valueFormat: function(d) {
return d.toFixed();
},
xAxis: {
showMaxMin: false
},
yAxis: {
axisLabel: 'Counts',
tickFormat: function(d) {
return d.toFixed();
}
}
}
};
$scope.data = [
{
"key": "Series1",
"color": "#d62728",
"values": [
{
"label" : "Group A" ,
"value" : -1.8746444827653
} ,
{
"label" : "Group B" ,
"value" : -8.0961543492239
} ,
{
"label" : "Group C" ,
"value" : -0.57072943117674
} ,
{
"label" : "Group D" ,
"value" : -2.4174010336624
} ,
{
"label" : "Group E" ,
"value" : -0.72009071426284
} ,
{
"label" : "Group F" ,
"value" : -0.77154485523777
} ,
{
"label" : "Group G" ,
"value" : -0.90152097798131
} ,
{
"label" : "Group H" ,
"value" : -0.91445417330854
} ,
{
"label" : "Group I" ,
"value" : -0.055746319141851
}
]
},
{
"key": "Series2",
"color": "#1f77b4",
"values": [
{
"label" : "Group A" ,
"value" : 25.307646510375
} ,
{
"label" : "Group B" ,
"value" : 16.756779544553
} ,
{
"label" : "Group C" ,
"value" : 18.451534877007
} ,
{
"label" : "Group D" ,
"value" : 8.6142352811805
} ,
{
"label" : "Group E" ,
"value" : 7.8082472075876
} ,
{
"label" : "Group F" ,
"value" : 5.259101026956
} ,
{
"label" : "Group G" ,
"value" : 0.30947953487127
} ,
{
"label" : "Group H" ,
"value" : 0
} ,
{
"label" : "Group I" ,
"value" : 0
}
]
}
]
from angular-nvd3.
My bower.json has these dependencies
"d3": "~3.4.11",
"nvd3": "~1.1.15-beta",
"angular-nvd3": "~0.0.8"
from angular-nvd3.
The "x" and "y" function definition don't match with data.
Change it to:
x: function(d) {
return d.label;
},
y: function(d) {
return d.value;
},
from angular-nvd3.
oh my bad - even after that the control don't work as expected.
from angular-nvd3.
it is working in plunker)
from angular-nvd3.
:) no worries i will debug it out to see whats happening.
from angular-nvd3.
Found the issue - it isn't related to the directive or any of the nvd3, d3 code. nvd3 adds a disabled class over the control, legend that is clicked to act as a toggle. I had a disabled class in my css that was disabling the pointer-events which was causing all the issues. I fixed it up and things are working as expected.
from angular-nvd3.
Related Issues (20)
- collisions of labels in the donut chart
- Is it possible to show the value of a pie chart slice consistently all the time, and not just by hovering over the pie chart HOT 1
- elementClick triggered only the second time HOT 1
- draw tree grap
- Read data from CSV file and Display Bar Chart
- Ionic Support for sunbrust and heatmap
- Customize legends css
- Background color as gradient in stacked area chart HOT 1
- Margin between Y label and Y axis tick values HOT 1
- How collapse child nodes when click on the parent or sub parent nodes
- Unknown provider: nvd3Provider <- nvd3 <- clientDashBoardPageCtrl
- Tooltips unable to disable while scrolling in responsive
- Log scale doesn't work properly with multiBarChart
- multiBarHorizontalChart reduceYTicks not working
- angular.js:13920 TypeError: Cannot read property 'graphs' of undefined
- Duration doesn't appear to have any affect on pieChart donut
- why zero valued point in sunburst chart got selected?
- NVD3 line chart tooltip stuck at old position on re-scale of chart
- Problem with dispatch events on Firefox.
- How to hide root from sunburst graph ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-nvd3.