The DX UIM Business Intelligence Portlet that ships with DX UIM 23.4.6 and higher includes a new Multi-Line Chart Widget.
The Multi-Line Chart can be used to display multiple series at once, similar to the existing Line Chart widget, but with more flexibility for creating dynamic reports.
Two data sources are supported:
ODATA API
SQL
Both datasources require a return of values labeled as "sampletime" and "samplevalue" to create a line chart.
This article explores the use of SQL data sources. For information on using ODATA sources for this widget, see this KB.
DX UIM - 23.4.6 (aka 23.4 CU6) or higher
DX UIM Business Intelligence (UIM BI) portlet (formerly Dashboard Designer)
In this example, we will create a simple dashboard that shows CPU and Memory Usage data for a selected set of robots.
The Multi-Line Widget is intended to be used alongside a Context Selector widget, so we will set that up first.
Setting Up The Multi-Line Chart
Once you have verified that the dropdown list of devices is working, edit the dashboard and follow these steps:
select q.source, rn.sampletime, rn.samplevalue
from S_QOS_DATA q, RN_QOS_DATA_0009 rn
where q.table_id = rn.table_id
and rn.sampletime > '${StartDate}'
and rn.sampletime < '${EndDate}'
and q.source in (select name from cm_computer_system where cs_id in (${CsIds}))
Save the dashboard again and go to Live View for testing.
At this point you should have a working dashboard that allows you to select one or more devices from the Drop Down and set a start and end date and populate the chart.
To add additional charts to display e.g. Memory and Disk metrics, repeat the same steps, substituting the appropriate RN Table value in the query as needed.
If you want to use a dropdown to select time frames like "Last Hour", "Last Week", and so on instead of selecting specific dates, this is possible with the following considerations:
1. You cannot use both the "Time Range" drop down and the Start/End Dates in the same context selector when using an SQL Data Source. If you want to use both, you can do so with the ODATA version. With SQL you have to choose one or the other.
2. Use the "Time" selector and not the "TimeRange" selector.
3. Alter the query used as follows:
select q.source, rn.sampletime, rn.samplevalue
from S_QOS_DATA q, RN_QOS_DATA_#### rn
where q.table_id = rn.table_id
and rn.sampletime > dateadd (SECOND, ${startTime}/1000, '1970-1-1')
and rn.sampletime < dateadd (SECOND, ${endTime}/1000, '1970-1-1') and
and q.source in (select name from cm_computer_system where cs_id in (${CsIds}))