Skip to content

Theme for charts #10104

@Eralmidia

Description

@Eralmidia

Question

I know there is a repository for the charts, but I believe the theming support were created by you guys, and since you are generally quick to respond, I'm hoping you can give me some pointers on themes for charts.

To put it simply, I don't understand how I'm supposted to style my charts at all. Since we upgraded from igx 10 to 12, I can't seem to get my charts to apply the correct brushes. Formerly, we generally fed the brushes to the brushes inputs of either the charts or series, but this no longer seems to work, because something in our theme.scss is overriding it.

My next attemt was setting up a theme, but this doesnt seem to work either, because the color palette supplied to the igx-theme seems to be overriding any colors set. So, for instance, I have the following set up for my applications dark theme:

image

As far as I understand, this should now give the first three series blue, pink and red colors. Looking at a data chart however, I get this:

image

The yellow color is actually provided by the palette. If I remove @include igx-theme($color-palette); from the theme
image

the colors of the theme will suddenly start working:
image

This will however mess with how other components look, like for instance the time picker, so I'm assuming this is not how I'm suppose to solve this:
image

It does seem like the theme is actually applied, because if I add forinstance a color the the title, like so:
image
this is actually displayed as expected:
image

Also, in the docs, I can see text color for title and sub title. How exactly do I set the label color?

I'm attaching the full theme.scss as well.
theme.zip

  • igniteui-angular version: 12

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions