I have 2 different charts using the same table of data. I should say, each is populated using a slice of the same table. In one chart I want the x axis to be labeled by State, in the other chart I want the x axis labeled by Campaign. If I mark State column in the data table as the Label, I get State on the x axis in both charts. Suggestions?
Hi @Mike_T
Depending on how critical it is in your app and the design of your app, you may want to explore the approach below. It is a bit longish but works.
AppSheet allows only one text and one image column as a label at a time. So the approach is centered around a “variable” text label.
I have modified the sample app US National parks and shows total park areas by state name and area by park name
- Create a VC with an expression something like
IFS(ANY(SELECTCHART[SELECTCHART])=“Park”, TEXT([Name]), ANY(SELECTCHART[SELECTCHART])=“State”,[State])
Assign this column as label There could be minor variations in expression based on how you wish the label name in other views. [Name] is the default label in the sample app. - SELECTCHART AND [SELECTCHART] is a single row, dual column option selector table with [SELECTCHART] being an Enum column with “State” and “Park” as options.
- Even the respective chart views have show_if based on SELECTCHART enum.
- A dashboard view containing the two chart columns and the single row CHARTSELCT table’s detail view.
- Instead of CHARTSELECT selector table, one could use USRSETTINGS
You could vary the implementation to suit your configuration. Essence is “variable” label.
Images from sample app.
Chart Option selected -State
Chart Option selected -Park
2 Likes
Very clever!
I have something similar already setup to filter the chart. I’ll take a look at this and see if this provides the solution I am after.
It would be nice if we could apply format rules to charts.
1 Like

