Showing results for 
Search instead for 
Did you mean: 

KX Dashboards -- Can't Connect DropDown To Chart


Hey Everyone, 

I've been playing around with Dashboards for a little bit and seem to always run into a problem getting a drop down list to connect with my chart.

In the View State for the drop down, I've got it setup for Default "sym" and Value "sym"


The Data for the chart appears to be setup properly (in accordance with the docus I've found).


And obviously I've check to verify that the data exists within the rootData table -- we're all good there. 


I've had this issue in the past and usually just give up, or resort to hardcoding the symbols and having to have multiple windows up at a time lol. I've gotta be doing something wrong here.





Why do I feel like it's because my table isn't keyed with sym? 

Moderator Moderator

Hello @planefan,

The root issue wouldn’t be related to whether or not table is keyed on sym. 
If the table is defined on the process, then it should be good. 

Just wondering, does that table have a column labelled sym with `sym in it? 




Yes, the table has a col "sym" with `sym in it

Here's the meta for the table:


In fact, when i query (within Dashboards): 

select from rootData where sym=`sym

works just fine. But when I try to run the query with the dropdown viewstate variable:

{[symbol] select from rootData where sym=symbol}
Comes up empty

Thanks for the additional information,

I'll do up an example on my side as soon as possible and will share the steps here. 

Kind regards,


Could the issue be related to my using a tickerplant and sub functions? The table I'm calling, rootData, isn't in my sym.q file -- it's just a table from a subfunction. 


Do I need to have the table format in sym.q to get the dropdown variable to work? 

New Contributor
New Contributor

Hi @planefan,

As long as rootData is defined on the process it shouldn't be an issue.
Using the following example, my rootData is defined on the process with the following meta and data


Then via the dashboard, within the dropdown datasource I am selecting the distinct symbols from this table


Then within the widget configuration, I set the viewstate for Selected Value to be selectedSym


This has no default and is of type symbol


Within the datasource mapping section, I am mapping the column sym for the dropdown.
This means the options the dropdown shows will be values from the column sym.
When I select one, it will map to the viewstate selectedSym


For example, when I select a from the dropdown:


With the dropdown setting up and mapping to the viewstate, this viewstate can now be fed into the datasource for the chart
For example, I have created a data grid which uses a datasource "exampleChart". This takes in the symbol and selects from rootData where the sym column matches the symbol selected from the dropdown.
This datasource looks like the following:
(Notice the viewstate being passed in is the same one the selected value in the dropdown maps to)


Within my function, if the passed in viewstate is empty, I return nothing from rootData. If it is not null, I return the rows from rootData where the symbol matches

Kind Regards,