"Fossies" - the Fresh Open Source Software Archive

Member "jpgraph-4.0.1/docs/chunkhtml/ch28.html" (21 Jun 2016, 7213 Bytes) of package /linux/www/jpgraph-4.0.1.tar.gz:

Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. Alternatively you can here view or download the uninterpreted raw source code. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

Chapter 28. Applying the prepared theme

To understand how themes are used, it is easiest to look at the sample code. For example, the Aqua Theme can be applied using the following.

$theme_class = new AquaTheme();

In line 1, an instance of AquaTheme class is created, and the graph theme is changed by passing the instance to SetTheme(). To use 'GreenTheme' instead of 'AquaTheme', use the following.

$theme_class = new GreenTheme;

All theme classes inherit the abstract 'Theme' class.

Figure 28.1. Aqua Theme (aqua_example.php)

Aqua Theme (aqua_example.php)

Figure 28.2. Green Theme (green_example.php)

Green Theme (green_example.php)

Figure 28.3. Ocean Theme (ocean_example.php)

Ocean Theme (ocean_example.php)

Figure 28.4. Pastel Theme (pastel_example.php)

Pastel Theme (pastel_example.php)

Figure 28.5. Softy Theme (softy_example.php)

Softy Theme (softy_example.php)

Figure 28.6. Vivid Theme (vivid_example.php)

Vivid Theme (vivid_example.php)

Figure 28.7. Orange Theme (orange_example.php)

Orange Theme (orange_example.php)

Figure 28.8. Rose Theme (rose_example.php)

Rose Theme (rose_example.php)

Figure 28.9. Universal Theme (universal_example.php)

Universal Theme (universal_example.php)