1
각도 nvd3을 사용하여 선형 차트를 표시하기 위해 다음 구성을 사용하고 있습니다. 문제는 가장자리 근처에 단 하나의 점이있는 경우 차트를 표시하는 동안 표시가 나타나지 않는 한 표시되지 않습니다.nvd3 라인 차트에 단일 포인트가 표시되지 않음
$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'
}
}
};
}