Maximo

 View Only
Expand all | Collapse all

MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

  • 1.  MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

    Posted Tue June 20, 2023 10:20 AM

    Hi Folks

    I'm trying to add a pie chart in Operational Dashboard some how i added it via editing app.xml but but unfortunately the data is not able to show.
    for i have attached the reference snapshot of code and pie chart below.
    if anyone in the forum have any idea about it please provide me the information about it.



    ------------------------------
    Tejas Mahor
    ------------------------------


  • 2.  RE: MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

    Posted Wed June 21, 2023 02:35 PM

    Several questions here: How did you edit the app.xml? Did you use the Maximo Application Framework Configuration Tool?If so did you create a valid data source for "tmpiedata"?



    ------------------------------
    Bradley K. Downing , MBA
    Senior Brand Technical Specialist
    IBM
    Bakersfield CA
    ------------------------------



  • 3.  RE: MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

    Posted Fri June 23, 2023 08:15 AM

    Yes using MAF and tmpiedata is custom pie data. 



    ------------------------------
    Tejas Mahor
    ------------------------------



  • 4.  RE: MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

    Posted Wed June 21, 2023 04:34 PM

    Internally, we have a reference app that has a bunch of examples. Below is what we have for this control. 

                  <dashboard-chart-tile allow-expand="true" chart-type="pie" allow-extra-action="true"
                    extra-actions="{[{id: 'firstItem',itemText: 'Item1'},{id: 'secondItem',itemText: 'Item2'},{id: 'thirdItem',itemText: 'Item3'}]}"
                    on-extra-action-click="onExtraAction" title="Pie Chart tile  (with segment click functionality)"
                    datasource="salesds" tooltip="Pie Chart tile" info-tooltip-link="http://www.ibm.com"
                    info-tooltip-link-text="Link" size="medium" on-segment-click="{app.toast('You clicked ' + arg)}"
                    on-segment-click-arg="Pie Segment" id="vps69p"
                  >
                    <chart-option name="data.groupMapsTo" value="Year" id="r__d7" />
                    <chart-option name="data.valueMapsTo" value="Net Profit" id="gxx2j" />
                    <chart-legend alignment="end" id="m6gek" />
                  </dashboard-chart-tile>

    That datasource uses a JSON src to build it which has 4 fields (_id, Year, Season, & Net Profit). You would want to update those to the appropriate attributes in your datasource.

    That being said, I would caution you prior to using this. I don't think we're using this control out of the box today. We have a lot of development going on to support dashboards and something may have been committed prior to it being completely finalized. 



    ------------------------------
    Steven Shull
    ------------------------------



  • 5.  RE: MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

    Posted Fri June 23, 2023 08:16 AM

    Thanks Steven
    It Worked



    ------------------------------
    Tejas Mahor
    ------------------------------



  • 6.  RE: MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

    Posted Fri June 23, 2023 08:17 AM

    do you have any code for line/bar graph



    ------------------------------
    Tejas Mahor
    ------------------------------



  • 7.  RE: MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

    Posted Mon June 26, 2023 08:30 AM

    Line:

                  <dashboard-chart-tile allow-expand="true" chart-type="line" title="Line Chart tile"
                    datasource="stocksds" tooltip="Line Chart tile" info-tooltip-link="http://www.ibm.com"
                    info-tooltip-link-text="Link" size="medium"  id="vp69p"
                  >
                    <chart-option name="data.groupMapsTo" value="Ticker" id="vssny3b" />
                    <chart-option name="curve" value="curveMonotoneX" id="djsmk3" />
                    <chart-legend id="m6gsek" position="top" />
                    <chart-axis position="bottom" title="Date" data-field="Date" scale-type="time" id="zdsr4q" />
                    <chart-axis position="start" title="Close" data-field="Close" scale-type="linear" id="k2sx76" />
                  </dashboard-chart-tile>

    Bar 
                  <dashboard-chart-tile allow-expand="true" chart-type="bar" allow-extra-action="true"
                    extra-actions="{{icon: 'Carbon:add'}}" on-extra-action-click="{app.toast('You clicked ' + arg)}"
                    on-extra-action-click-arg="Bar Segment" title="Bar Chart tile" datasource="salesds"
                    tooltip="Bar Chart tile" info-tooltip-link="http://www.ibm.com" info-tooltip-link-text="Link"
                    size="medium" id="avps69p"
                  >
                    <chart-axis position="bottom" title="Year" data-field="Year" id="zdsra4q" />
                    <chart-axis position="start" title="Net Profit" data-field="Net Profit" scale-type="linear" id="k2aasx76" />
                    <chart-option name="data.groupMapsTo" value="Season" id="ar__d7" />
                    <chart-legend position="top" orientation="vertical" alignment="end" id="jpw42" />
                  </dashboard-chart-tile>



    ------------------------------
    Steven Shull
    ------------------------------



  • 8.  RE: MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

    Posted Thu July 13, 2023 09:19 AM

    Hi Steven

    I tried to add both the chart in my demo dashboard but some how I'm not getting how to pass count of work order.

    I'm also to get the bars on bar chart. I'm using maximo data source do we have any document for this which tells how define these charts and the data source ?






    ------------------------------
    Tejas Mahor
    ------------------------------



  • 9.  RE: MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

    IBM Champion
    Posted Wed July 19, 2023 08:14 AM

    Tejas -

    Good morning.  Thought it was important that you knew about this known Issue with the Op Dashboard.  The issue can cause the MAS system to be unusable.  A fix is scheduled for 8.10.4 at the end of August.

    https://www.ibm.com/mysupport/s/defect/aCI3p000000bpkO/dt224599?language=en_US

    Thanks.



    ------------------------------
    Pam Denny
    Maven Asset Management
    pdenny@mavenasset.com
    ------------------------------



  • 10.  RE: MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

    Posted Thu September 14, 2023 12:40 PM

    Hi Steven. I'm trying to make a dashboard using MAF including some graphs. So far, so good. I have managed to include several types of graphics but I am missing a couple.

      In the examples I have seen, some bar charts have a division by dates or days on the x-axis. Which in your example would be the date field. However, when I try to do it using the date field in the same way, nothing appears.

    If you change it to something else like assettype for example, the graph works fine. My question is, could you help me know how to do this count by days or dates on the x-axis please.

      Or I could see how the datasource was defined for the graphs you attached as an example to see if the date field requires anything additional, since as far as I understand, it does not exist in Maximo.

    I have this:

    But I want to get this:



    ------------------------------
    Carlos Borboa
    ------------------------------



  • 11.  RE: MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

    Posted Thu September 14, 2023 12:43 PM

    Hi Steven. I'm trying to make a dashboard using MAF including some graphs. So far, so good. I have managed to include several types of graphics but I am missing a couple.

      In the examples I have seen, some bar charts have a division by dates or days on the x-axis. Which in your example would be the date field. However, when I try to do it using the date field in the same way, nothing appears.

    If you change it to something else like assettype for example, the graph works fine. My question is, could you help me know how to do this count by days or dates on the x-axis please.

      Or I could see how the datasource was defined for the graphs you attached as an example to see if the date field requires anything additional, since as far as I understand, it does not exist in Maximo.

    I want to get something like this. I am grouping by assettype and its count



    ------------------------------
    Carlos Borboa
    ------------------------------



  • 12.  RE: MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

    Posted Thu February 29, 2024 05:50 AM

    Hi Carlos,

    Were you able to find a workaround for this? I have the same requirement. 

    Thanks for your time. 



    ------------------------------
    Ansel Gonsalves
    ------------------------------



  • 13.  RE: MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

    Posted Fri March 01, 2024 12:39 AM



    Hello Ansel.

    How are you? Fortunately, we were able to find a way to create the Operational Dashboard we needed. It is important to mention that it was a challenge. We made different attempts with the code but finally this was the result:



    Is that similar to what you need?



    ------------------------------
    Carlos Borboa
    ------------------------------



  • 14.  RE: MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

    Posted Fri March 01, 2024 06:19 AM

    Hi Carlos,

    This is a very nice work. Could you share how did you customize the dashboard?

    Thanks



    ------------------------------
    John Paul Degala
    ------------------------------



  • 15.  RE: MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

    Posted 4 days ago

    Hi Carlos,

    This is excellent. Can you share how you customized the dashboard, please?

    Thanks



    ------------------------------
    ASR
    ------------------------------



  • 16.  RE: MAS 8 How to add chart's like pie/bar/line/donut in Operational Dashboard - MAF - Maximo Mobile

    Posted 2 hours ago

    Yes, of course.

     

    First of all, I used MAF as the tool to customize that. For that, I pulled up its image using Docker on Ubuntu. You can find the steps to achive it in Internet. It is of great importance mentioning that you will need your IBM key to be able to download everything. Again, all the steps are found in internet.

     

    Then, you are going to see the list of all the applications that can be customizable. Select "Operational Dashboard" For making visible changes, you have  to add code using XML. Nevertheless, for graphs, I created some "Object Structures" to group the information that is deployed.  Also, I included "Saved Queries" in the "Object Structures" to filter  the information as a "WHERE clause". I share with you a little about the code that here, in DEF ALLIANCE, we have used.



    <! -- Operational Dashboard customized by DEF ALLIANCE -->

    <! -- First, we added datasources -->


    <maximo-datasource id="grafica" object-structure="MXAPIASSET" include-counts="true" page-size="100" pre-load="true" saved-query="grafica1">
        <groupby-columns id="x6qvr">
          <groupby-column name="status" id="g36rm"/>
          <groupby-column order-by="asc" function="count" name="*" id="g5jmw"/>
        </groupby-columns>
      </maximo-datasource>

      <maximo-datasource id="graficados" object-structure="MXAPIASSET" include-counts="true" page-size="100" pre-load="true" saved-query="grafica2">
        <groupby-columns id="x6qvra">
          <groupby-column name="assettype" id="g36rma"/>
          <groupby-column function="count" name="*" id="e7r8r"/>
        </groupby-columns>
      </maximo-datasource>

    <! -- After, we included graphs -->

    <box padding-end="0.3" background-color="#000000" id="esjjanla5kn" fill-parent-vertical="true" horizontal-align="center" fill-parent-horizontal="true">
                    <dashboard-chart-tile tooltip="Total de camiones y camionetas agrupadas por estado" allow-extra-action="true" allow-expand="true" has-title-wrap="true" datasource="grafica" chart-type="donut" title="TOTAL DE UNIDADES POR ESTADO" size="medium" id="zaa8asrapad">
                    <chart-option name="data.groupMapsTo" value="status" id="qnsk93ad"/>
                    <chart-option name="data.valueMapsTo" value="count" id="gej9s2da"/>
                    <chart-option name="donut.center.label" value="Total" id="sassewakda7"/>
                    <chart-option name="alignment" value="center" id="uauas9gdaa"/>
                    <chart-option name="animations" value="cenfalseter" id="uasua9a3ad"/>
                    <chart-option name="accessibility" value="false" id="s8uaasa9dga"/>
                    <chart-legend id="aa6asgwdek" position="top" alignment="start"/>
                  </dashboard-chart-tile>
                </box>


                <box padding-end="0.3" padding-start="0.3" background-color="#000000" id="esjjsaadnl5kn" fill-parent-vertical="true" horizontal-align="center" fill-parent-horizontal="true">
                  <dashboard-chart-tile tooltip="Camiones y camionetas con estado DISPONIBLE" allow-extra-action="true" allow-expand="true" datasource="graficados" chart-type="donut" title="DISPONIBLES" size="medium" id="zaa8rapa">
                          <chart-option name="data.groupMapsTo" value="assettype" id="qnk93a"/>
                          <chart-option name="data.valueMapsTo" value="count" id="gej92a"/>
                          <chart-option name="donut.center.label" value="Total" id="sasewaka7"/>
                          <chart-option name="alignment" value="center" id="uaua9gaa"/>
                          <chart-option name="animations" value="cenfalseter" id="uaua9a3a"/>
                          <chart-option name="accessibility" value="true" id="s8uaaa9ga"/>
                          <chart-legend id="aa6agwek" position="top" alignment="start"/>
                        </dashboard-chart-tile>           
                </box>


    I hope this was useful for you :)



    ------------------------------
    Carlos Borboa
    ------------------------------