I am using following configurations for displaying my line chart with the help of angular nvd3. The issue is that while displaying the chart if there is only one point near the edge then it gets doesn't get displayed unless it is hovered upon.
$scope.options = {
chart: {
type: 'lineChart',
forceY:[0],
height: 450,
margin : {
top: 30,
right: 70,
bottom: 68,
left: 90
},
x: function(d){ return d[0]; },
y: function(d){ return d[1]; },
useInteractiveGuideline: false,
xDomain: [moment($scope.calenderStartDate).valueOf(), moment($scope.calenderEndDate).valueOf()],
lines:{
dispatch: {
elementClick: function(e){
console.log(e);
handleDataForTable(e.point.x,e.series.key);
$scope.api.refresh();
},
elementMouseout: function(){}
}
},
xScale: d3.time.scale().clamp(true),
xAxis: {
tickFormat: function(d){
return d3.time.format('%d-%b-%y')(new Date(d))
},
rotateLabels:-30
},
legend: {
vers: 'furious'
},
showLegend:false,
yAxis: {
axisLabel: 'No of Bookings',
tickFormat: function(d){
return d3.format('d')(d);
}
},
callback: function(chart){
console.log("!!! lineChart callback !!!");
},
defined:function(d) { return !isNaN(d[1]); }
},
title: {
enable: false,
text: 'Title for Line Chart'
},
subtitle: {
enable: false,
text: '',
css: {
'text-align': 'center',
'margin': '10px 13px 0px 7px'
}
},
caption: {
enable: false,
html: '',
css: {
'text-align': 'justify',
'margin': '10px 13px 0px 7px'
}
}
};
}