How to change line colors in 7 days stats graph

Moderator: crythias

Locked
heinrich_neumann
Znuny newbie
Posts: 16
Joined: 31 Oct 2010, 14:10
Znuny Version: 2.4.7

How to change line colors in 7 days stats graph

Post by heinrich_neumann »

How can I change the colors of the "Created" and "Closed" lines in the
7 days stats graph?
Dankeschoen!
root
Administrator
Posts: 4254
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: How to change line colors in 7 days stats graph

Post by root »

Hi

Under the assumption you use OTRS 2.4 modify Kernel/Output/HTML/Standard/AgentDashboardTicketStats.dtl
and add the colors of your choice. See around line 50:

Code: Select all

var seriesDef = [
    { displayName: "$JSText{"Created"}", yField: "Created",  },
    { displayName: "$JSText{"Closed"}", yField: "Closed" }
];
and change it to e.g.:

Code: Select all

var seriesDef = [
    { displayName: "$JSText{"Created"}", yField: "Created", style: {lineColor:0xff0000, fillColor:0xff0000}}
    { displayName: "$JSText{"Closed"}", yField: "Closed" }
];

(see 'series & styles' at http://developer.yahoo.com/yui/examples ... tyles.html)

You should also follow the guidelines for modifying Themes and create your own one to keep your system upgrade-aware.

hth, Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Locked