This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
phptsmadmin/includes/jpgraph/docs/chunkhtml/ch29.html
2011-05-28 19:51:52 +10:00

31 lines
3.5 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 29. Attention</title><link rel="stylesheet" type="text/css" href="manual.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.0"><link rel="home" href="index.html" title="JpGraph Manual"><link rel="up" href="pt07.html" title="Part VII. Theme Class"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 29. Attention</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center">Part VII. Theme Class</th><td width="20%" align="right"> </td></tr></table><hr></div><div class="chapter" title="Chapter 29. Attention"><div class="titlepage"><div><div><h2 class="title"><a name="id2619303"></a>Chapter 29. Attention</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="ch29.html#id2619634">29.1. The order of SetTheme() and changing settings</a></span></dt><dt><span class="sect1"><a href="ch29s02.html">29.2. Changing the display settings of line/bar graphs</a></span></dt></dl></div>
<p>When using themes, there are some things that require particular attention.</p>
<div class="sect1" title="The order of SetTheme() and changing settings"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2619634"></a>The order of SetTheme() and changing settings</h2></div></div></div>
<p>At first, $graph-&gt;SetTheme() should be used after creating the graph, just after $graph-&gt;SetScale(). The following code is an example.
</p>
<p>
</p><div class="hl-main"><table class="hl-table" width="100%"><tr><td class="hl-gutter" align="right" valign="top"><pre>1
2
3
4
</pre></td><td class="hl-main" valign="top"><pre><span class="hl-code">$graph = new Graph(750, 320, 'auto');
$graph-&gt;SetScale('textlin');
$theme_class = new AquaTheme;
$graph-&gt;SetTheme($theme_class);</span></pre></td></tr></table></div><p>
</p>
<p>In this way, all the settings of AquaTheme(grid, background and font color etc) can be applied. Any plots after this will also use the AquaTheme settings.
Of course there are times where we only want to change individual settings and not the overall theme. For example, there is no outline around the graph in 'AquaTheme'. To add an outline we can do the following. After SetTheme(), you can use functions to change individual settings.
If you want to display an outline around the graph, add the following line to the code shown previously.
</p>
<p>
</p><div class="hl-main"><table class="hl-table" width="100%"><tr><td class="hl-gutter" align="right" valign="top"><pre>1
</pre></td><td class="hl-main" valign="top"><pre><span class="hl-code">$graph-&gt;SetFrame(true);</span></pre></td></tr></table></div><p>
</p>
<p>In this way, all the settings of AquaTheme(grid, background and font color etc) can be applied. Any plots after this will also use the AquaTheme settings.
</p>
</div>
</div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"> </td><td width="20%" align="center"><a accesskey="u" href="pt07.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>