40
Views
5
Comments
How to add a gradient colors to bar chart?
Question

So basically I'm having a barchart where the information is taken from the logic in preparations using the server action  which has the components as below:

Name: Chart Name 

Action: DataPoint_Init

Label: Replace(List.Current.Code, "_", "") + " " + List.Current.Des

Value: List.Current.Amt

DataSeriesName: Replace(List.Current.Code, "_", "")

ToolTip: 

Color: "Red"

and then it is being appened. What I want is to show gradients of red in the color scetion of the bar chart 

UserImage.jpg
Tara coup

Thats for area right? sorry I'm very new so. Also I have n series of data ntg is sepcified

2024-06-01 07-14-16
Vaishali Thakur

Hello @Tara coup

Inside your Server Action, create a list of colors you want to use for the gradient.

List<Color> colors = new List<Color> {

    "#FFCDD2", // Light Red

    "#EF9A9A", // Medium Light Red

    "#E57373", // Medium Red

    "#EF5350", // Dark Medium Red

    "#F44336"  // Dark Re

d

};

Thank you.

UserImage.jpg
Tara coup

I get this"Syntax error caused by unexpected 'List' element in expression. " error can share your oml

2024-05-14 06-49-08
Karnika-EONE

HI @Tara coup 

  I have solved your problem and attached the OML.Please check the HIghchartsDemo screen.



Thanks

Karnika

ContentTag.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.