Skip to content

Conversation

@Kaienss
Copy link

@Kaienss Kaienss commented Oct 1, 2021

Added one option to dataset
shadowColor: similar to color, if not provided, shadow color for the dataset will be the same as the line color with useShadowColorFromDataset:true,
if useShadowColorFromDataset:false,
shadow color will be chartConfig.color.

shadow color is applied with following priority.
dataset.shadowColor -> dataset.color -> chartConfig.color

Added one option to dataset
shadowColor: similar to color, if not provided, shadow color for the dataset will be the same as the line color with useShadowColorFromDataset:true,
if useShadowColorFromDataset:false,
shadow color will be chartConfig.color.

shadow color is applied with following priority.
dataset.shadowColor -> dataset.color -> chartConfig.color
};

getShadowColor = (dataset: Dataset, opacity: number) => {
return (dataset.shadowColor || dataset.color || this.props.chartConfig.color)(opacity);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like it should default to url(#fillShadowGradient..., to make this change backwards compatible

Copy link
Contributor

@Hermanya Hermanya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change looks like it would change behaviour for existing users

@codeplaygoa
Copy link

@Kaienss @Hermanya any update here. I badly need this feature

Copy link

@josh-thompson13 josh-thompson13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants