Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
SQL Chart equips you with another medium of reporting by using charts. You are given the flexibility of defining your own SQL query to determine the charts that you would like to generate, ranging from a number of graph types.
Info | ||
---|---|---|
| ||
Download the tutorial app on SQL Charts from Joget Workflow Marketplace to learn more. |
Figure 1: SQL Chart Properties
...
Name | Description | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
SQL Query | SQL Query to produce the dataset required for the graph type.
Example 1:
Example 2:
|
Figure 4: SQL Chart Properties - UI
...
Name | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Datasource |
If the default datasource is selected, the custom JDBC settings below will be ignored. | ||||||||||
Userview Key Name | When defined, additional condition will be appended using the value defined here as the parameter and the userview key value as the value.
When userview key value is defined, you may define #userviewKey# in your SQL query to have it replaced with the userview key value.
|
The following code can be modified and put in "Custom Footer" for interactive Chart.
Code Block |
---|
<script> $(document).ready(function(){ $('#jq_plot_chart').bind('jqplotDataClick', function (event, seriesIndex, pointIndex, data) { console.log(event); console.log(seriesIndex); console.log(pointIndex); console.log(data); //for chart which used legend and x-axis, var xaxis = $(".jqplot-xaxis-tick:eq("+pointIndex+")"); var series = $(".jqplot-table-legend-label:eq("+seriesIndex+")"); console.log("x-axis :" + xaxis.text()); console.log("series :" + series.text()); } ); //for double click event. Please note the arguments are different. $('#jq_plot_chart').bind('jqplotDblClick', function (event, coordinate, points, data) { console.log(event); console.log(coordinate); console.log(points); console.log(data); if (data) { var xaxis = $(".jqplot-xaxis-tick:eq("+data.pointIndex+")"); var series = $(".jqplot-table-legend-label:eq("+data.seriesIndex+")"); console.log("values :" + data.data); console.log("x-axis :" + xaxis.text()); console.log("series :" + series.text()); } } ); }); </script> |
Note |
---|
This code does not work with OHLC and candlestick chart. |