Comments (4)
What you would like to set to enable custom domain is on line 245:
y.domain([
d3.min(yData),
d3.max(yData) + padding
]);
to:
y.domain([
d3.min(yData),
myDomainMax + padding
]);
from angular-charts.
I'm not sure I understand the problem here, could you point me to a use case where you need to set domain range manually ?
For 80% of the cases, default domain should work fine. As they are calculated on the basis of data you provide. Padding is just d3.max(yData) * 0.20
- added to keep the bars from touching top of the chart.
from angular-charts.
I can not recreate it using the plunker. So I suppose it is me providing it with some data that makes the d3 calculation freak out (feel free to close this isse).
The setup I am using is shown below. The data array is created from a string of numbers separated by newline, therefore i regex remove this and create a proper array of it, the console log looks allright though:
var thisThrow = HistoryService.getThrow($stateParams.throwId);
$scope.config = {
title: 'Values in throw',
tooltips: true,
labels: false,
mouseover: function() {},
mouseout: function() {},
click: function() {},
legend: {
display: true,
//could be 'left, right'
position: 'right'
}
};
$scope.history = {
data: [{
x: '0',
y: thisThrow.data.replace(/(\r\n|\n|\r)/gm,'').split(''),
tooltip: 'this is tooltip'
}]
};
from angular-charts.
I guess, thisThrow.data.replace(/(\r\n|\n|\r)/gm,'').split('')
this will return a string array. console it out and check. Try mapping it to Number like this thisThrow.data.replace(/(\r\n|\n|\r)/gm,'').split('').map(function(d) { return Number(d); });
from angular-charts.
Related Issues (20)
- Pie Chart Radius
- Typeerror on IE11
- bower install error - ECONFLICT Unable to find suitable version for d3
- It doesn't work with AngularJS 1.4.* HOT 1
- Customize tootlip value for a Pie Chart HOT 1
- Syntax Error on Legend ng-show
- Charts can't be displayed within tabs HOT 3
- Y-Axis Scale
- It works with angular 1.2.28 but not with 1.4.8 HOT 1
- legend width
- 'Please set height and width for the chart element' on window resize HOT 2
- Issue in makeToolTip function of angular-chart.js
- Why doesn't the Pie chart show multiple y axis values?
- Multi-Series Grouped and Stacked Bar Chart HOT 1
- missing parameter d in call of function updateToolTip
- if title is false height ist not correct in setContainers
- How to display date on lable?
- How to add different colors to each bars in BarChart
- About adding units to the angular-charts on the X-axis and Y-axis.
- Please set height and width for the chart element for example code with AngularJS 1.7.6
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-charts.