Skip to content

Commit

Permalink
fix:(core): Scatter points fix (carbon-design-system#703)
Browse files Browse the repository at this point in the history
* chore(angular): add angular 9 dependency versions to peerDependencies

* fix(core): fix scatter points color and opacity

fix carbon-design-system#469

* fix theming for scatter points

Co-authored-by: Eliad Moosavi <[email protected]>
  • Loading branch information
2 people authored and linhenry0417 committed Jul 23, 2020
1 parent 377c39f commit 5dd3bb6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/components/graphs/scatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class Scatter extends Component {
styleCircles(selection: Selection<any, any, any, any>, animate: boolean) {
// Chart options mixed with the internal configurations
const options = this.model.getOptions();
const { filled } = options.points;
const { filled, fillOpacity } = options.points;
const { cartesianScales, transitions } = this.services;

const { groupMapsTo } = options.data;
Expand Down Expand Up @@ -210,7 +210,7 @@ export class Scatter extends Component {
);
}
})
.attr("fill-opacity", filled ? 0.2 : 1)
.attr("fill-opacity", filled ? fillOpacity : 1)
.attr("stroke", (d) =>
this.model.getStrokeColor(
d[groupMapsTo],
Expand Down
10 changes: 10 additions & 0 deletions packages/core/src/styles/graphs/_scatter-stacked.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
g.#{$prefix}--#{$charts-prefix}--scatter-stacked {
circle.dot.unfilled {
fill: $ui-01;
stroke-width: 1.5;
}

circle.dot.threshold-anomaly {
stroke-width: 3;
}
}
1 change: 1 addition & 0 deletions packages/core/src/styles/graphs/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
@import "./bubble";
@import "./line";
@import "./scatter";
@import "./scatter-stacked";
@import "./radar";
@import "./gauge";

0 comments on commit 5dd3bb6

Please sign in to comment.