I have several pie charts. I would like to drilldown from each of the pie charts
to the same table in a different view page.
So far I am able to drilldown any value of the piechart to separate tables in the other
page. But to save space, I would like to drilldown to the same table. I am trying
this conditional OR statement, but it seems not to work. Is it the case that
for the search to work, all the tokens in the search should have a value
assigned to it? How to assign a default value to a token? or do I have to use
some eval statement here?
This is the PieChart in View 1 (Similarly I have several other piecharts)
<chart>
<title>Traffic Locations</title>
<searchString>index=location source=traffic_locations | fields state_name | top 20 state_name</searchString>
<option name="charting.chart">pie</option>
<option name="maxResultCount">200000</option>
<drilldown>
<!--<set token="state_name">$click.value$</set>-->
<link>
<![CDATA[
/app/myapp/myview1_2?form.state_name=$click.value$
]]>
</link>
</drilldown>
</chart>
This is search for the table in View 2
<row>
<panel>
<table>
<search>
<query>index=location source=traffic_locations
| search * (state_name=$form.state_name$ OR zip_code=$form.zip_code$) <!-- This doesnt work! -->
| table location, state_name, zip_code, address, quantity
| sort by state_name</query>
</search>
<option name="wrap">true</option>
<option name="rowNumber">false</option>
<option name="dataOverlayMode">none</option>
<option name="drilldown">cell</option>
<option name="count">20</option>
<option name="rowNumbers">false</option>
</table>
</panel>
</row>
Please help. Thanks in advance.
... View more