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/ch35s03s02.html
2011-05-28 19:51:52 +10:00

22 lines
2.8 KiB
HTML
Raw 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>Getting the grid lines right</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="ch35s03.html" title="The Init() method"></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">Getting the grid lines right</th></tr><tr><td width="20%" align="left"> </td><th width="60%" align="center">The Init() method</th><td width="20%" align="right"> </td></tr></table><hr></div><div class="section" title="Getting the grid lines right"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id2622113"></a>Getting the grid lines right</h2></div></div></div>
<p>Since we want some discrete horizontal grid lines we might think that it is
enough to do the normal</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;ygrid-&gt;Show();</span></pre></td></tr></table></div><p>
</p>
<p>However, doing that will not show any grid lines. The reason is hat by default
the grid lines are drawn at the bottom of the plot. Since we have filled area
plots covering 100% of the pot area no grid lines would show. In order to change
this we need to move the grid line to the front with a call to the method</p>
<p>
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
<p><code class="code">Graph::SetGridDepth($aDepth)</code></p>
</li></ul></div><p>
</p>
<p>using the argument <code class="code">DEPTH_FRONT</code>. The rest of the grid line
formatting is just basic style and color modification to make the grid visible
but just barely.</p>
</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="ch35s03.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>