Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow stroke to be used for line-chart data points #1449

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/line-chart-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('dc.lineChart', function () {
chart.selectAll('circle.dot').each(function () {
var dot = d3.select(this);
expect(dot.style('fill-opacity')).toBeWithinDelta(0.8);
expect(dot.style('stroke-opacity')).toBeWithinDelta(0.8);
expect(dot.style('stroke-opacity')).toBeWithinDelta(0.0);
expect(dot.attr('r')).toBe('2');
});
});
Expand Down
7 changes: 4 additions & 3 deletions src/line-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ dc.lineChart = function (parent, chartGroup) {
.style('fill-opacity', _dataPointFillOpacity)
.style('stroke-opacity', _dataPointStrokeOpacity)
.attr('fill', _chart.getColor)
.attr('stroke', _chart.getColor)
.on('mousemove', function () {
var dot = d3.select(this);
showDot(dot);
Expand Down Expand Up @@ -546,8 +547,8 @@ dc.lineChart = function (parent, chartGroup) {
* @memberof dc.lineChart
* @instance
* @example
* chart.renderDataPoints({radius: 2, fillOpacity: 0.8, strokeOpacity: 0.8})
* @param {{fillOpacity: Number, strokeOpacity: Number, radius: Number}} [options={fillOpacity: 0.8, strokeOpacity: 0.8, radius: 2}]
* chart.renderDataPoints({radius: 2, fillOpacity: 0.8, strokeOpacity: 0.0})
* @param {{fillOpacity: Number, strokeOpacity: Number, radius: Number}} [options={fillOpacity: 0.8, strokeOpacity: 0.0, radius: 2}]
* @returns {{fillOpacity: Number, strokeOpacity: Number, radius: Number}|dc.lineChart}
*/
_chart.renderDataPoints = function (options) {
Expand All @@ -563,7 +564,7 @@ dc.lineChart = function (parent, chartGroup) {
_dataPointRadius = null;
} else {
_dataPointFillOpacity = options.fillOpacity || 0.8;
_dataPointStrokeOpacity = options.strokeOpacity || 0.8;
_dataPointStrokeOpacity = options.strokeOpacity || 0.0;
_dataPointRadius = options.radius || 2;
}
return _chart;
Expand Down
3 changes: 0 additions & 3 deletions style/dc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,6 @@ div.dc-chart {
cursor: default;
}
}
circle.dot {
stroke: none;
}
}

.dc-data-count {
Expand Down