1 # stylingprofile.pod - Guide to Styling Profiles
2 # Copyright (C) 2003 Shawn Ferry
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18 # $Id: stylingprofile.pod.in,v 1.1 2010-12-27 00:04:32 ivan Exp $
19 # Shawn Ferry <sferry at sevenspace dot com> <lalartu at obscure dot org>
22 =head1 Torrus Styling Profile Guide
24 =head2 Styling Profiles
26 Styling profiles allow for symbolic names to be used in place of hard
27 coded values for C<line-color> and C<line-style>.
29 =head3 Schema Definitions
31 The following styles are defined in the default schema.
35 =item * Required Styles (C<line-style>, C<line-color>)
38 SingleGraph HWBoundary HWFailure
39 HruleMin HruleNormal HruleMax
43 =item * Generic Symbolic styles (C<line-color> only)
47 =item * Symbolic, Symbolic names, for default use in graphs that have up
48 to ten items (C<line-color> only)
55 =item * Symbolic names for combinatorial graphing (C<line-style>,
63 =item * Color definitions from the TT2 rgb example set (C<line-color> only)
65 Defined in F<@supdir@/styling/colornames.pl>
78 =item * Color definitions for web html colors (C<line-color> only)
80 Defined in F<@supdir@/styling/colornames.pl>
82 aliceblue antiquewhite aqua
83 aquamarine azure beige
84 bisque blanchedalmond blueviolet
85 brown burlywood cadetblue
86 chartreuse chocolate coral
87 cornflowerblue cornsilk crimson
88 cyan darkblue darkcyan
89 darkgoldenrod darkgray darkgreen
90 darkkhaki darkmagenta darkolivegreen
91 darkorange darkorchid darkred
92 darksalmon darkseagreen darkslateblue
93 darkslategray darkturquoise darkviolet
94 deeppink deepskyblue dimgray
95 dodgerblue firebrick floralwhite
96 forestgreen fuchsia gainsboro
97 ghostwhite gold goldenrod
98 gray greenyellow honeydew
99 hotpink indianred indigo
101 lavenderblush lawngreen lemonchiffon
102 lightblue lightcoral lightcyan
103 lightgoldenrodyellow lightgreen lightgrey
104 lightpink lightsalmon lightseagreen
105 lightskyblue lightslategray lightsteelblue
106 lightyellow lime limegreen
107 magenta maroon mediumaquamarine
108 mediumblue mediumorchid mediumpurple
109 mediumseagreen mediumslateblue mediumspringgreen
110 mediumturquoise mediumvioletred midnightblue
111 mintcream mistyrose moccasin
112 navajowhite navy oldlace
113 olive olivedrab orangered
114 orchid palegoldenrod palegreen
115 paleturquoise palevioletred papayawhip
117 plum powderblue purple
118 rosybrown royalblue saddlebrown
119 salmon sandybrown seagreen
120 seashell sienna silver
121 skyblue slateblue slategray
122 snow springgreen steelblue
124 tomato turquoise violet
125 wheat whitesmoke yellow
129 =head3 Schema Overlay
131 I<WARNING: Some styles are mandatory>
133 Schema overlays allow the user to extend or override the styles defined in the
134 default schema. The schema overlays are formatted in the form of a hash of
140 =item * Extending the schema:
142 To add the styles, C<##onefish>, C<##twofish>, C<##redfish>, C<##bluefish>
143 the following entries should be created in a descriptive file located
144 in the C<styling> directory.
148 $Torrus::Renderer::graphStyles{'onefish'}{'color'} = '##darkred';
149 $Torrus::Renderer::graphStyles{'onefish'}{'line'} = 'LINE1';
151 $Torrus::Renderer::graphStyles{'twofish'}{'color'} = '##red';
152 $Torrus::Renderer::graphStyles{'twofish'}{'line'} = 'LINE2';
154 $Torrus::Renderer::graphStyles{'redfish'}{'color'} = '##yellow';
156 $Torrus::Renderer::graphStyles{'bluefish'}{'color'} = '##deeppink';
158 Other methods of adding to the hash of hashes are also acceptable.
160 =item * Overriding Styles:
162 To override specific styles in the existing schema, C<##in>, C<##out>,
163 entries similar to the following should be created in a Perl file,
164 preferably located in the local configuration directory.
166 C<in_out-override-schema.pl>
168 $Torrus::Renderer::graphStyles{'in'}{'color'} = '##yellow';
169 $Torrus::Renderer::graphStyles{'out'}{'color'} = '##maroon';
171 Other methods of adding to the hash of hashes are also acceptable.
173 =item * Applying your Overlay
179 In the torrus-siteconfig.pl file, add the variable
181 $Torrus::Renderer::stylingProfileOverlay =
182 $Torrus::Global::cfgSiteDir . '/in_out-override-schema.pl';
190 You may have to wait for the image cache to clear before the changes
195 =head3 Schema Replacement
197 To replace a schema, create a new schema using torrus-schema.pl as a guide.
198 Remember some styles are mandatory.
202 =item * Applying your Schema
204 In the F<torrus-siteconfig.pl> file, add the variable
206 $Torrus::Renderer::stylingProfile = "Your-schema";
208 =item 2. Restart apache
212 You may have to wait for the image cache to clear before the changes
217 Copyright (c) 2003 Shawn Ferry