You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a below query using angular2-nvd3.js version 1.0.7-
Using ticks in Option values for line chart inconsistent dates observed on x-axis. While using tickValues able to fix consitent dates dynamically but on legend click / resizing browser window ticks on x-axis disappeared.
xAxis: {
axisLabel: '',
tickValues: function(d){
var between = []
var secondDate = d[0].values[d[0].values.length-1].date;
var firstDate = d[0].values[0].date;
//get all dates between max and min date
while (firstDate <= secondDate) {
between.push(new Date(firstDate));
firstDate.setDate(firstDate.getDate() + 4);
}
return between;
},
showMaxMin: false,
rotateLabels: -90,
tickFormat: function (d) {
return d3.time.format('%m/%d/%y ')(new Date(d));
}
}
Expected: x-axis ticks using tickValues angular2-nvd3 v1.0.7 should not disappear on legend click / chrome browser window resize.
Actual: inconsistent dates with random interval on x-axis using angular2-nvd3 v1.0.7.
The text was updated successfully, but these errors were encountered:
I have a below query using angular2-nvd3.js version 1.0.7-
Using ticks in Option values for line chart inconsistent dates observed on x-axis. While using tickValues able to fix consitent dates dynamically but on legend click / resizing browser window ticks on x-axis disappeared.
Any kind of help will be highly appreciated.
//Problem code
xAxis: {
axisLabel: '',
ticks: 22,
showMaxMin: false,
rotateLabels: -90,
tickFormat: function (d) {
return d3.time.format('%m/%d/%y ')(new Date(d));
}
}
[Tried below solution code]
xAxis: {
axisLabel: '',
tickValues: function(d){
var between = []
var secondDate = d[0].values[d[0].values.length-1].date;
var firstDate = d[0].values[0].date;
Expected: x-axis ticks using tickValues angular2-nvd3 v1.0.7 should not disappear on legend click / chrome browser window resize.
Actual: inconsistent dates with random interval on x-axis using angular2-nvd3 v1.0.7.
The text was updated successfully, but these errors were encountered: