-
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 2 commits
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 | ||||
---|---|---|---|---|---|---|
|
@@ -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], null, 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.