Jump to content

Specify chart element color in the data table


Tristan Magnay

Recommended Posts

Is there a way that the color that should be used for e.g a bar in a bar chart, can be specified in the data table row(s) that is contributing to that chart element? For instance, if my data is a list of the number of different types of animal at the zoo. Could I create a bar chart reflecting the animal counts and specify that bar color for Elephant should be Grey and the bar color for Kangaroo should be Red by including those color values in a column in the data table (by name; hex code; RGB) and then setting that column to provide the color values to use in the chart?

Annoyingly this is easily done in PowerBi but I haven’t managed it in SF.

Thanks in advance.

#DrSpotfire​ 

Link to comment
Share on other sites

You'll want to create a color scheme that can applied to other visualizations. Create a visualization that includes all of the categories you wish to define, and set the colors for each one under Properties/Colors. Once that has been done click on the color scheme drop-down to the right, and save the scheme. You can then apply this scheme to any other visualizations that you create. You can also make it the default for all new visualizations by clicking on Tools/Options/Visualization/Default categorical color scheme.

There is more information about using color schemes under Help/Help Topics and searching for Color Schemes under the Index tab.

Link to comment
Share on other sites

Thanks for the response @Kirsten Smith​, and you're half right - technically you could argue that I want to create a color scheme. But I do not want to create a color scheme using the method provided to me in the product which is incredibly point-and-click heavy. In my example above, imagine my zoo has 100 types of animal and I've got a custom color for each one - that's not something for which I can realistically create a color scheme in the UI (I could programmatically create a suitable .dxpcolor file but there should be a more accessible solution).

It's worth looking at what Power Bi can do - it allows color specification by color code or name provided in a "field/measure" (with some aggregating factor). See here: Color by Color value - Power Bi

Given the maturity of the product I'm surprised similar functionality doesn't already exist. Would it be something that could be put to the developers for consideration to introduce in a future release.

#DrSpotfire​ 

Link to comment
Share on other sites

  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...