Select on the Units tab in the left hand side column and click on the Bar Chart button under the UI components.
It will generate a Gadget window in the design tab with small canvas in side it. Gadget window can resize by dragging from the bottom-right corner of the gadget window. Canvas which will be the bar chart can be moved by dragging the small green colored box and can be resize by dragging the ash colored box(Appears after selecting the canvas by clicking on the green colored box top of the canvas) on the bottom-right in canvas.
Now we need to put some data needed to visualize in the chart.
By clicking on the data flow tab you can see small window which represent the bar chart. There is three inputs in it (data, labels, values).
Lets get some data from Cassandra source (more info).
Click on the Cassandra Sources button under Data Sources in the units tab. It will generates a another window in the data flow tab.
Put correct values on the fields Table Name, Table Index Name and Index (you can add multiple indexes by clicking on âadd Selectorâ button.) and press load button.
It will query from the Cassandra source and return some fields. Right hand side you have outputs fields which you can wire with bar chart and in the left hand side you have more filtering options.
Select the correct fields from it (basically string and integer value would do it here) and wire it with bar chart inputs (drag from the field you need and drop it to the label or value field).
In Design tab you can see your chart is generated.
Lets create a combobox to filter this by the label name. For this we have deployed a web service method to get distinct values from the cassandra field called getIndexValues in /services/IndexAdminService?wsdl.
Click on the Data Sources / Web Service (WSDL) button in the units tab. Provide the wsdl url (for this scenario [host][webContext]/services/IndexAdminService?wsdl) and click load. Select the operation(getIndexValues) from the drop-down list.
Provide two inputs indexName and indexedColumns in the generated terminals on the left-hand side ( note : these inputs may vary for each operation).
Click on the Constant / Text and it will generates another window with a text box ,enter the value for the indexName in it and click on set button. Do the above step for the set the indexedColumn as a constant value and wire it with wsdl source inputs.
Click on the UI / ComboBox. In data flow tab wire wsdl source out put to ComboBox input.
ComboBox can be previewed in the design tab.
Wire the ComboBox output with cassandra source input [range / from] terminal. Click on the Math / Lexical String Generator button and wire it's input with same ComboBox output which linked to the Cassandra source input.
Wire the Lexical String Generator output with Cassandra source input [range / to].
Bar chart now represents the selected ComboBox value.
Click on the UI / Pie Chart and wire it's input with the same cassandra source output fields which need to visualize.