I want to have on the same page a pie chart and a bar chart, with trellis pages. They both have 5 columns as trellis, so 5 different pages that you can visualize by scrolling down.
However, I would like to display the same pages at the same time for both graphs. For instance, let's imagine I'm on the pie chart, I scroll down one page - and so my pie chart is on page2 - I want my bar chart to automatically go to page 2 as well
I tried to use markings but although it links a bit the two graphs, it doesn't change the trellis pages automatically
Does anyone know how to do this ?
as @scsimon mentions, there's no native feature (nor API method, AFAIK) for this using a trellis. however, you can create a Property Control (I'd use a dropdown) in a Text Area, then use the same Document Property to your chart in a Limit By expression.
little more detail, assuming a data table like this:
A B CATEGORY
1 2 red
3 4 red
5 6 green
7 8 green
9 10 blue
11 12 blue
- add a Text Area to the page and edit its contents
- add a Property Control
- click New to create a Document Property, give it a type String and a name
category
- change Set property value through to Unique values in column and choose the "category" column and click OK
- save the Text Area contents
- in your Pie Chart's Properties dialog, go to the Data page and look for Limit data using expression. click Edit
- set the expression to:
[CATEGORY] = "${category}"
(don't forget the quotes or the Document Property won't be treated as a string and you'll get an error) - repeat steps 6 & 7 for your other chart
As @scsimon mentioned in the comments, it seems to be impossible. I found a way to have a similar representation though without using trellis visualization, by using text arena
I created a list box that contains the 5 columns I want to visualize, and then I select this list box as the vertical axis variable of the bar chart and the sector size of the pie chart
Then, by clicking on my list box, I can have a synchronized Pie chart and Bar chart (a bit different from what I expected but it also has some advantages like a multiple scale since a new graph is generated independently of the other variables)
来源:https://stackoverflow.com/questions/46786427/match-two-trellis-pages-between-two-different-graphs