I. Overview
Chart blocks can be dragged into a dashboard for presentation. A chart block is set in the same way as charts in a common report, but with component-specific settings added to realize dynamic effects between components, such as auto query and component linkage.
II. Steps
1. Set the appearance of chart components
You may customize the appearance of the widgets.
2. Set the auto query effect
Drag the drop-down box into the body rather than the parameter pane to realize auto query.
1) Add two datasets each for data and the drop-down box respectively
ds1 (as the source of data for chart and report blocks):
SELECT * FROM Sales where 1=1${if(len(p)=0,"","and Region = '"+p+"'")}
ds2 (as the source of data for the drop-down box):
SELECT distinct region FROM Sales
2) Drag the drop-down box and label widgets into the body and place them on top of the chart block and the report block.
3) Bind the data source ds1 to the chart block and the data source ds2 to the drop-down box
4) View the effect
3. Set component linkage
1) Change the parameter in ds1 to p_id
SELECT * FROM Saleswhere 1=1${if(len(p_id)=0,"","and id ='"+p_id+"'")}
2) Edit the report block and add a hyperlink to column id. Select Current Dashboard Object as the type
3) Preview the effect. This feature is similar to a hyperlink in a common report.
Note:Both Current Dashboard Object and Dynamic Parameters, two hyperlink options, can realize the effect of component linkage, but the former only works on specified components while the latter works on all components that reference this parameter.