Home Analyst Portal

Creating more complex charts in the Cireson Portal

john_doylejohn_doyle Cireson Support Ninja IT Monkey ✭✭✭✭
The SQL Chart widgets are great for quickly generating simple dashboards. Sometimes however you may want to display more complex data. For example, you may wish to display a chart showing the backlog of active work items over the course of the last 10 days.

Here is an example of how that can be done in the Cireson Portal.

First, you need to define a data source. This query will give the number of open incidents, service requests and change requests which have not been resolved, completed or closed on each day.
;WITH lastTenDays AS 

Open the Portal as an administrator, and click on the Admin Settings link on the drop-down menu in the top right-hand corner. Click on the link for Dashboard Query Settings.
Click Add.
Enter 'Work Item Backlog' for the name
Set the Data Source as ServiceManagement
Copy/paste the SQL query from above.
Save the query.

Now open SQL Server and run this query against the ServiceManagement database.
select Id, Title

Copy the guid from the Id field returned by this query.

Now open the file explorer on the Portal server.
Browse to C:\inetpub\CiresonPortal\CustomSpace\views
Create a file called backlog.js in this folder.
Add this code to the file:
{

Next, open the subfolder called viewpanels in the views folder.
Create a file called vp-backlog.js in this folder.
Add this code to that file:
{


Finally go back to the Portal and open the Navigation Settings menu from the drop-down menu in the top right-hand corner.
Add a new link to /view/backlog
Set the Title, behaviour, icon and visibility.
When you click on the link you should see:

You can specify a different chart type in the view panel. For example, this is the same data displayed as a stacking area chart.






Comments

  • Stephane_BouillonStephane_Bouillon Customer Adept IT Monkey ✭✭
    Thanks for your time and effort and for sharing John.

    I also found a simple solution displaying the backlog by date, but for one workitem type at the time. While mine only uses the standard capabilities in the portal, your end result is nicer :) This is what I had come up with:

    SQL Table Widget
    WITH Dates AS (
    SQL Graph Widget - Query Name: Service Request Backlog Trend, Chart Type: Area, Category Field: Date, Value Field: Backlog


    What would be needed to achieve the same result as yours is to be able to have multiple value fields columns for a line, bar or area graph and I think a check-box dropdown for the value field would be ideal :wink:

    Thanks again,
    Stephane
  • john_doylejohn_doyle Cireson Support Ninja IT Monkey ✭✭✭✭
    @Stephane_Bouillon it would be good to be able to define multiple series for the chart. I agree. I like the work you've done in any case!
  • Karen_Bruster1Karen_Bruster1 Member IT Monkey ✭
    @john_doyle I tried to run the SQL query to get the GUID and it returned a blank.Any Ideas?
  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    When running the query in SQL Management studio does it return a data set?
  • Karen_Bruster1Karen_Bruster1 Member IT Monkey ✭
    @Brian_Wiest No it basically is blank, only think it shows are the tiles, id and Title
  • James_JohnsonJames_Johnson Customer Adept IT Monkey ✭✭

    Hi @John,

    Could you possibly repost the code from the original post? I'm working on trying to set something like your stacked line chart up and it would be incredibly helpful.

    Thanks!

    James

Sign In or Register to comment.