-
Notifications
You must be signed in to change notification settings - Fork 189
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
fix(getFillColor):data parameter missing from the arguments #1736
Changes from 1 commit
3eeaa53
5c6380f
eee2d97
37dc1a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -198,7 +198,7 @@ export class Area extends Component { | |||||
originalClassName: 'area' | ||||||
}) | ||||||
) | ||||||
.style('fill', (group: any) => self.model.getFillColor(group.name)) | ||||||
.style('fill', (group: any) => self.model.getFillColor(group.name, undefined, group.data)) | ||||||
.transition() | ||||||
.call((t: any) => | ||||||
this.services.transitions.setupTransition({ | ||||||
|
@@ -216,7 +216,9 @@ export class Area extends Component { | |||||
if (boundsEnabled) { | ||||||
enteringAreas | ||||||
.attr('fill-opacity', areaConfigs.opacity.selected) | ||||||
.style('stroke', (group: any) => self.model.getStrokeColor(group.name)) | ||||||
.style('stroke', (group: any) => | ||||||
self.model.getStrokeColor(group.name, undefined, group.data) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
) | ||||||
.style('stroke-dasharray', '2, 2') | ||||||
.attr('stroke-width', 0.7 + 'px') | ||||||
} | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -94,7 +94,7 @@ export class Line extends Component { | |||||
originalClassName: 'line' | ||||||
}) | ||||||
) | ||||||
.style('stroke', (group: any) => this.model.getStrokeColor(group.name)) | ||||||
.style('stroke', (group: any) => this.model.getStrokeColor(group.name, undefined, group.data)) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
// a11y | ||||||
.attr('role', Roles.GRAPHICS_SYMBOL) | ||||||
.attr('aria-roledescription', 'line') | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -94,7 +94,8 @@ export class Radar extends Component { | |||||
.nice(yTicksNumber) | ||||||
const yTicks = yScale.ticks(yTicksNumber) | ||||||
|
||||||
const colorScale = (group: string): string => this.model.getFillColor(group) | ||||||
const colorScale = (group: string, key?: any, data?: any): string => | ||||||
this.model.getFillColor(group, key, data) | ||||||
|
||||||
// constructs a new radial line generator | ||||||
// the angle accessor returns the angle in radians with 0° at -y (12 o’clock) | ||||||
|
@@ -366,9 +367,9 @@ export class Radar extends Component { | |||||
? () => `translate(${c.x}, ${c.y}) scale(${1 + Math.random() * 0.35})` | ||||||
: `translate(${c.x}, ${c.y})` | ||||||
) | ||||||
.style('fill', (group: any) => colorScale(group.name)) | ||||||
.style('fill', (group: any) => colorScale(group.name, undefined, group.data)) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
.style('fill-opacity', radarConfigs.opacity.selected) | ||||||
.style('stroke', (group: any) => colorScale(group.name)) | ||||||
.style('stroke', (group: any) => colorScale(group.name, undefined, group.data)) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
.call((selection: any) => { | ||||||
const selectionUpdate = selection.transition().call((t: any) => | ||||||
this.services.transitions.setupTransition({ | ||||||
|
@@ -397,8 +398,8 @@ export class Radar extends Component { | |||||
originalClassName: 'blob' | ||||||
}) | ||||||
) | ||||||
.style('fill', (group: any) => colorScale(group.name)) | ||||||
.style('stroke', (group: any) => colorScale(group.name)) | ||||||
.style('fill', (group: any) => colorScale(group.name, undefined, group.data)) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
.style('stroke', (group: any) => colorScale(group.name, undefined, group.data)) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
update.call((selection: any) => | ||||||
selection | ||||||
.transition() | ||||||
|
@@ -717,7 +718,7 @@ export class Radar extends Component { | |||||
.map((d: any) => ({ | ||||||
label: d[groupMapsTo], | ||||||
value: d[valueMapsTo], | ||||||
color: self.model.getFillColor(d[groupMapsTo]), | ||||||
color: self.model.getFillColor(d[groupMapsTo], undefined, d), | ||||||
class: self.model.getColorClassName({ | ||||||
classNameTypes: [ColorClassNameTypes.TOOLTIP], | ||||||
dataGroupName: d[groupMapsTo] | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we shouldn't send
undefined
over.Here's an example in
scatter.ts
Let's try to send all of that info over pls, and in case we can't locate the data, use
null
instead ofundefined
plsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This applies to all the files in the PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://charts.carbondesignsystem.com/documentation/classes/Chart.html
the charts in this list don't have access to cartesianScale hence I couldn't use getDomainIdentifier with those and some of the charts receive binned and stacked data. I'll be sending null as mentioned.