Hello Team ,
I want to assign some Built in theme to Data Grid Header and Circular Gauge Chart :
For Data Grid : I want to use themes like Material, Fabric , Tailwind , etc & To assign them to Data Grid Header.
Adding Some Snapshot for Refer
and also Same for Circular Gauge , it should applied to the cap color and needle tail color .
SnapShot for Refer :
So please provide some solution , to use different themes for this two charts .
please reply ASA
Queries |
Details | |
For Data Grid : I want to use themes like Material, Fabric , Tailwind , etc & To assign them to Data Grid Header |
In your requirement, you want to apply different theme in the Grid based on the dropdown value. So, we have prepared sample with your requirement. In the dropdown change event, we have changed the themes with the help of link tag.
Find the below sample and KB for more information.
Available themes in EJ2: https://ej2.syncfusion.com/angular/documentation/appearance/theme/
By using below documentation you can override the default CSS styles of specific element in the Grid.
| |
Same for Circular Gauge , it should applied to the cap color and needle tail color . |
In the Circular Gauge Component, we can set the theme for the cap and needle using the “theme” property. However, we can set the “theme” property in the "load" event. Please find the code snippet for applying the theme in the "load" event below.
Code Snippet:
We have created a simple sample to demonstrate the same and it can be found from the below link.
In the above sample link, we used a dropdown list to select different types of themes to apply to the Circular Gauge control. |
Hii Indumathi Ravi,
Thank you for your Reply , but it won't help me at all.
for Data grid : i want to change grid header color according to chart theme . if we select Material theme than that theme should be applied only on grid header cell and not on text . Like these :
for Circular gauge : i want to change gauge Color according to differnt themes . in your example it is changing in background.
but i want to change for gauge and Needle Circular Bottom Shown in figure :
please provide me ASAP so i can work on it ..
Queries |
Details | ||
for Data grid : i want to change grid header color according to chart theme . if we select Material theme than that theme should be applied only on grid header cell and not on text. |
We understand from your requirement, you want to change only header cell background column based on theme change. We can achieve your requirement by using the following CSS. Please find the code example and sample for your reference.
Code snippet:
In your DropDownList change we added class name in Grid table based on your Theme name and apply the following CSS.
| ||
for Circular gauge : i want to change gauge Color according to differnt themes . in your example it is changing in background. |
The color of the axis line, major and minor ticks in the Circular Gauge varies depending on the theme. But the border of the pointer cap does not support the themes. However, we can change the border color of the pointer cap using “border” property for each theme. We have set the axis line color to the border of the pointer cap in the “loaded” event. Please find the code snippet for setting the border color of the pointer cap below.
Code snippet:
We have created a simple sample to demonstrate the same and it can be found from the below link.
|
Hii Indumathi Ravi,
I am using sparkline chart and in that i want to use different themes , So that if i want to switch my theme to MAterial,fabric ,HighContrast or any themes. So Sparkline Chart should Get Color of that respected theme. So i had used your Code but in that Fill Color is applying on sparkline , not theme Color .
Your Code:
<ejs-sparkline id='container' width='350px' height='200px' [axisSettings]= 'axisSettings' theme= 'Highcontrast' [dataLabelSettings]= 'dataLabelSettings' [tooltipSettings]= 'tooltipSettings' [border]= 'border' [dataSource]="data" fill= '#007dd1' type="Line"> </ejs-sparkline>
please give me Some code which will satisfy mine requirement .
I request you to provide Tomorrow afternoon .
Please
<ejs-sparkline theme='Highcontrast'> </ejs-sparkline> |