Topic Thread

Expand all | Collapse all

14.6 - Multi-line bar charts in dashboard portlets?

  • 1.  14.6 - Multi-line bar charts in dashboard portlets?

    Posted 10-20-2015 10:30 AM

    Hi all,

     

    Has anyone successfully managed to create multi-line bar charts in a dashboard portlet? For example, I'd like to take the area chart for 'Incident Trend by Impact' portlet and change it to a line chart, like this:

     

    30days.PNG

     

    However I can only get the portlet to display one series, and cannot add a legend or a caption to the X axis unless the chart is expanded. These are not show stoppers, but having mulitple series in one chart is.

     

    My XML currently looks like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <searches>
        <search baseline="Pane" major="1" label="BK 9 Incident Trend By Policy" description="BK 9 Incident Trend By Policy" 
            type="system" category="Dashboard" dictionary="dlp_dashboard" no_settings="true" restricted="false" >
            <parameters>
                <parameter name="name" value="tc_alert_trend_imp_v1_1"/>
                <parameter name="package" value="dlpdash"/>
                <parameter name="type" value="line"/>
                <!--<parameter name="width" value="10" />-->
                <parameter name="caption" value="Test Caption" />
                <parameter name="Caption-x" value="120" />
                <parameter name="caption-y" value="240" />
                <parameter name="options" value="data-labels" />
                <parameter name="lstChartType" value="2" report_value="Line" hidden="false" />
                <parameter name="lstAllowedChartTypes" value="0,1,2,3,4,5,6"/>
                <parameter name="caption" value="Test caption" />
     <!--           <parameter name="drilldown" value="Events By Time/Policy"/> -->
     <!--           <parameter name="lstDrilldown" value="3"/> -->
                
                <parameter name="txtAttributes" value="ValueAxisType:Date" hidden="false" />
            </parameters>
            <results>
              <column name="Day" type="text" label="Date" hidden="true" />
              <column name="High" type="numeric" label="High" hidden="false" display="true"/>
              <!-- <column name="Medium" type="numeric" label="Medium" display="true" />-->
              <!-- <column name="Low" type="numeric" label="Low" hidden="false" display="true" /> -->
              <!-- <column name="NotSet" type="numeric" label="Not Set" hidden="false" display="true" /> -->
              <!--<column name="ID" label="ID" type="id" primary_key="true" hidden="true" display="false" /> -->
           </results>
        </search>
    </searches>
    

     

    Which works as expected, one line is displayed:

    Capture2.PNG

     

    However once I modify the query to return multiple severities based by date, nothing is plotted:

    capture3.PNG

    Modified the XML to expect the new columns with no luck:

    <?xml version="1.0" encoding="UTF-8"?>
    <searches>
        <search baseline="Pane" major="1" label="BK 9 Incident Trend By Policy" description="BK 9 Incident Trend By Policy" 
            type="system" category="Dashboard" dictionary="dlp_dashboard" no_settings="true" restricted="false" >
            <parameters>
                <parameter name="name" value="tc_alert_trend_imp_v1_1"/>
                <parameter name="package" value="dlpdash"/>
                <parameter name="type" value="line"/>
                <!--<parameter name="width" value="10" />-->
                <parameter name="caption" value="Test Caption" />
                <parameter name="Caption-x" value="120" />
                <parameter name="caption-y" value="240" />
                <parameter name="options" value="data-labels" />
                <parameter name="lstChartType" value="2" report_value="Line" hidden="false" />
                <parameter name="lstAllowedChartTypes" value="0,1,2,3,4,5,6"/>
                <parameter name="caption" value="Test caption" />
     <!--           <parameter name="drilldown" value="Events By Time/Policy"/> -->
     <!--           <parameter name="lstDrilldown" value="3"/> -->
                
                <parameter name="txtAttributes" value="ValueAxisType:Date" hidden="false" />
            </parameters>
            <results>
              <column name="Day" type="text" label="Date" hidden="true" />
              <column name="High" type="numeric" label="High" hidden="false" display="true"/>
              <column name="Medium" type="numeric" label="Medium" display="true" />
              <column name="Low" type="numeric" label="Low" hidden="false" display="true" />
              <column name="NotSet" type="numeric" label="Not Set" hidden="false" display="true" />
              <!--<column name="ID" label="ID" type="id" primary_key="true" hidden="true" display="false" /> -->
           </results>
        </search>
    </searches>
    

     

    I also tried adding an identity key, but that didn't help. What am I doing wrong here? Is this a defect? Has anyone successfully plotted more than one line on a line chrat (type 2)



  • 2.  Re: 14.6 - Multi-line bar charts in dashboard portlets?

    Posted 10-21-2015 09:16 AM

    Beeks

     

    Brian,

     

    I Have little experience with portlet customization as this is an activity normally undertaken by the CA Global Delivery (GD) team as a billable service but I do not believe that you have encountered a "defect" but you may have come across a limitation in the portlet design.  I will flag this with my CA colleagues on the off chance this is something that has been encountered with other customers and in the meantime I hope you get further assistance from the community.  Alternatively please contact your CA Account Manager to discuss the options for engaging CA Global Delivery.

     

    Regards
    Andy Devine

    Snr. Support Engineer

    CA Technologies



  • 3.  Re: 14.6 - Multi-line bar charts in dashboard portlets?

    Posted 10-21-2015 09:23 AM

    Thanks, Andy. I have only limited access to a few clients and nobody has requested this sort of portlet before--area charts have always sufficed. I would hope that this doesn't seem like it's a ground breaking request

     

    If anyone from your team or anyone at all has at least seen this type of chart before, and not an embedded Excel COM object that would be at least good to know. Another alternative I have is to generate the chart using a 3rd party library and display it as an embedded web page in the portlet, but I'd hate to go that route.