https://i.sstatic.net/ITbJm.png
I am encountering difficulty in obtaining all the X and Y intersection points on the axis as shown in the graph image. Additionally, I would like to emphasize the intersection points with a dark circle. Any assistance in resolving this issue would be highly appreciated.
The code used to fill the chart is as follows:
options :
chart: {
type: 'lineChart',
height: 300,
margin : {
top: 120,
right: 100,
bottom: 40,
left: 100
},
x: function(d){ return d.x; },
y: function(d){ return d.y; },
useInteractiveGuideline: false,
tooltips: false,
xAxis: {
tickFormat: function(d) {
return d3.time.format('%x')(new Date(d));
},
showMaxMin: false<br>
},
yAxis: {
tickFormat: function(d) {
return '$' + d3.format('.0f')(d)
}
},
}
var dates = [new Date('12/1/2017'),new Date('12/2/2017'),new Date('12/3/2017'),new Date('12/4/2017'),new Date('12/5/2017')];
var spend = [22, 14, 13, 11, 12];
data = genrateData();
function generateData() {
var dailySpend = [];
for(var i=0; i < dates.length; i++){
dailySpend.push({x: dates[i], y: spend[i]})
}
return [
{
values: dailySpend,
key: 'Daily Spend'
}
];
}