Dashboard 7 day Stats Graph Configuration

Moderator: crythias

Locked
Gunz
Znuny newbie
Posts: 44
Joined: 30 Jun 2010, 01:43
Znuny Version: 2.4

Dashboard 7 day Stats Graph Configuration

Post by Gunz »

Hi, I now understand that the configuration of the Dashboard 7 Day Stats graph is done within "DashboardBackend###0250-TicketStats" but is there any way to change the graph line colours, background colour and other characteristics used in this graph?

It appears to be a Flash element... does it load it's paramters via a config file?

Thanks in advance for your help!
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Dashboard 7 day Stats Graph Configuration

Post by crythias »

Read this: http://developer.yahoo.com/yui/charts/
Change this (hopefully in your own theme):
otrs/Kernel/Output/HTML/Standard/AgentDashboardTicketStats.dtl

Code: Select all

       { displayName: "$JSText{"Created"}", yField: "Created",
          style: {
              color: 0xff0000,
          }
         },
        { displayName: "$JSText{"Closed"}", yField: "Closed" }
this gives the "Created" line a red color.

Code: Select all

    var mychart = new YAHOO.widget.LineChart( "chart$QData{"Key"}", myDataSource, {
        series: seriesDef,
        xField: "Day",
        yAxis: YAxis,
        dataTipFunction: YAHOO.OTRS.Dashboard.getDataTipText,
        style: {
           background: {
              color: 0x995566
           }
        },
        //only needed for flash player express install
        expressInstall: "assets/expressinstall.swf"
    });
this gives some reddish background.

If you're testing this stuff out, you'll want to consider emptying the otrs/var/tmp/Cache/Dashboard to watch the changes "work".

*this means that you have to add lines of code to the .dtl, but if you're paying attention, you should be able to figure this out.
*WATCH OUT FOR COMMA usage. If you miss a comma, you'll get an error like "You need to install Flash to see this."
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Gunz
Znuny newbie
Posts: 44
Joined: 30 Jun 2010, 01:43
Znuny Version: 2.4

Re: Dashboard 7 day Stats Graph Configuration

Post by Gunz »

As always - big thanks for your assistance!
Letter
Znuny newbie
Posts: 13
Joined: 29 May 2013, 10:25
Znuny Version: 3.2.7

Re: Dashboard 7 day Stats Graph Configuration

Post by Letter »

What would be the syntax in 3.2 be for

Code: Select all

 { displayName: "$JSText{"Created"}", yField: "Created",
          style: {
              color: 0xff0000,
          }
         },
        { displayName: "$JSText{"Closed"}", yField: "Closed" }
Thank you
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Dashboard 7 day Stats Graph Configuration

Post by crythias »

var/httpd/htdocs/js/Core.UI.Chart.js

Code: Select all

    TargetNS.DrawLineChart = function (ChartName, ChartData, TicksXAxis, TicksYAxis) {
        var Options = {
                colors: ["#ffc515", "#1a89ba", "#2eb200", "#ff4f15"],
ffc515 = gold
1A89BA = medium blue
2eb200 = green
ff4f15 = red

(Colors names are approximate and not "official" nomenclature, but intended to provide a hint as to which color you might want to change.)

The class "ticketLabel" applies to the axis label content.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Letter
Znuny newbie
Posts: 13
Joined: 29 May 2013, 10:25
Znuny Version: 3.2.7

Re: Dashboard 7 day Stats Graph Configuration

Post by Letter »

Crythias,
thank you for the quick answer. However, I tryed switching around the colors or only keeping green and red and I can't seem to have anything change.
All I want to do is to have created created trickets in green and closed tickets in red on the Dashboard screen (7 days stats graph).

Is there anything more to do?
Thank you,
Regards,
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Dashboard 7 day Stats Graph Configuration

Post by crythias »

may check/delete js cache.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Locked