1
折れ線グラフを角度nvd3で表示するために以下の設定を使用しています。問題は、エッジの近くにポイントが1つしかない場合にグラフを表示している間に、グラフが表示されない限り表示されないことです。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'
}
}
};
}