Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In the pChart examples, see the page [Examples > Area Chart > drawAreaChart.threshold]. <img src="https://i.stack.imgur.com/4RE1S.png" alt="Screenshot of pGraph documentation example for drawAreaChart with threshold coloring"> This does colorizes parts of an area (in area graphs) if they are inside a threshold you configure. </p> <p>Code snippet from that example:</p> <pre><code>/* Draw the area chart */ $Threshold = ""; $Threshold[] = array("Min"=&gt;0,"Max"=&gt;5,"R"=&gt;187,"G"=&gt;220,"B"=&gt;0,"Alpha"=&gt;100); $Threshold[] = array("Min"=&gt;5,"Max"=&gt;10,"R"=&gt;240,"G"=&gt;132,"B"=&gt;20,"Alpha"=&gt;100); $Threshold[] = array("Min"=&gt;10,"Max"=&gt;20,"R"=&gt;240,"G"=&gt;91,"B"=&gt;20,"Alpha"=&gt;100); $myPicture-&gt;setShadow(TRUE,array("X"=&gt;1,"Y"=&gt;1,"R"=&gt;0,"G"=&gt;0,"B"=&gt;0,"Alpha"=&gt;20)); $myPicture-&gt;drawAreaChart(array("Threshold"=&gt;$Threshold)); </code></pre> <p>This coloring above/below thresholds is possible in area graphs. I doubt this works for line graphs, but its worth a try..</p> <p>Its also possible to indicate thresholds with a horizontal line, also from this example:</p> <pre><code>/* Write the thresholds */ $myPicture-&gt;drawThreshold(5,array("WriteCaption"=&gt;TRUE,"Caption"=&gt;"Warn Zone","Alpha"=&gt;70,"Ticks"=&gt;2,"R"=&gt;0,"G"=&gt;0,"B"=&gt;255)); $myPicture-&gt;drawThreshold(10,array("WriteCaption"=&gt;TRUE,"Caption"=&gt;"Error Zone","Alpha"=&gt;70,"Ticks"=&gt;2,"R"=&gt;0,"G"=&gt;0,"B"=&gt;255)); </code></pre> <p>This threshold dotted line is supported in line (so non-area) graphs by the way.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload