Notice: Undefined variable: chart in /home/maani63/public_html/xml_charts/source.php on line 22
<!-- this page contains the code for 2 charts (composite chart), which must be separated into 2 files --> <!-- the first chart renders another chart by using the draw function --> <!-- This example is mostly static XML code. PHP scripts are sparsely used to read the link_data variable and print some XML code. --> <!-- this is the source code for the first chart --> <chart> <axis_category shadow='low' size='8' alpha='75' orientation='diagonal_down' /> <axis_ticks value_ticks='1' category_ticks='1' major_thickness='1' minor_thickness='1' major_color='000000' minor_color='555555' /> <axis_value shadow='low' size='9' color='000000' alpha='65' steps='2' suffix='%' min='0' max='100' /> <chart_border color='000000' top_thickness='0' bottom_thickness='0' left_thickness='3' right_thickness='1' /> <chart_data> <row> <null/> <string>SUN</string> <string>MON</string> <string>TUE</string> <string>WED</string> <string>THU</string> <string>FRI</string> <string>SAT</string> </row> <row> <string></string> <number>30</number> <number>35</number> <number>95</number> <number>90</number> <number>80</number> <number>65</number> <number>55</number> </row> </chart_data> <chart_grid_v alpha='5' color='000000' thickness='5' /> <chart_rect x='100' y='30' width='60' height='150' positive_color='000066' negative_color='000000' positive_alpha='10' negative_alpha='30' /> <chart_type>bar</chart_type> <draw> <text shadow='high' color='000000' alpha='15' rotation='-90' size='60' x='-10' y='302' width='400' height='150'>bandwidth</text> <text color='ffffff' alpha='20' size='150' x='46' y='170' width='400' height='150'>>></text> <line layer='background' x1='50' x2='200' y1='138' y2='138' line_color='99bbee' line_alpha='100' line_thickness='25' /> <circle layer='background' x='350' y='140' radius='135' fill_alpha='0' line_color='99bbee' line_alpha='100' line_thickness='25' /> <image url='charts.swf?library_path=charts_library&xml_source=xml%2FGallery_Composite_2_2.php%3Fcategory%3D<?php print $_REQUEST["category"]; ?>' transition='slide_left' duration='2' /> </draw> <filter> <shadow id='low' distance='2' angle='45' color='0' alpha='50' blurX='4' blurY='4' /> <shadow id='high' distance='5' angle='45' color='0' alpha='50' blurX='10' blurY='10' /> </filter> <legend layout='hide' /> <link_data url='xml/Gallery_Composite_2_1.php' target='update' spinning_wheel='true' wheel_x='210' wheel_y='138' /> <series_color> <color>ff4488</color> </series_color> <series set_gap='30' /> </chart> <!--=========================================================================== --> <!-- this is the source code for the second chart --> <chart> <axis_category shadow='low' size='8' alpha='50' /> <axis_ticks value_ticks='1' category_ticks='1' major_thickness='1' minor_thickness='1' major_color='000000' minor_color='555555' /> <axis_value shadow='low' size='9' color='000000' alpha='65' steps='4' suffix='%' max='100' /> <chart_border color='000000' top_thickness='0' bottom_thickness='0' left_thickness='3' right_thickness='0' /> <chart_data> <row> <null/> <string>12:00</string> <string>11:00</string> <string>10:00</string> <string>9:00</string> <string>8:00</string> <string>7:00</string> <string>6:00</string> <string>5:00</string> <string>4:00</string> <string>3:00</string> <string>2:00</string> <string>1:00</string> <string>12:00</string> <string>11:00</string> <string>10:00</string> <string>9:00</string> <string>8:00</string> <string>7:00</string> <string>6:00</string> <string>5:00</string> <string>4:00</string> <string>3:00</string> <string>2:00</string> <string>1:00</string> </row> <row> <string></string> <?php switch ( $_REQUEST['category'] ){ case "SUN": print "<number>6</number> <number>11</number> <number>13</number> <number>20</number> <number>23</number> <number>27</number> <number>30</number> <number>31</number> <number>30</number> <number>27</number> <number>25</number> <number>26</number> <number>25</number> <number>27</number> <number>26</number> <number>23</number> <number>21</number> <number>22</number> <number>21</number> <number>20</number> <number>17</number> <number>11</number> <number>7</number> <number>4</number>"; break; case "MON": print "<number>8</number> <number>15</number> <number>17</number> <number>25</number> <number>30</number> <number>27</number> <number>32</number> <number>35</number> <number>40</number> <number>45</number> <number>42</number> <number>40</number> <number>30</number> <number>25</number> <number>23</number> <number>20</number> <number>25</number> <number>28</number> <number>26</number> <number>28</number> <number>20</number> <number>15</number> <number>9</number> <number>6</number>"; break; case "TUE": print "<number>18</number> <number>35</number> <number>40</number> <number>60</number> <number>70</number> <number>85</number> <number>90</number> <number>95</number> <number>92</number> <number>90</number> <number>85</number> <number>80</number> <number>85</number> <number>87</number> <number>85</number> <number>80</number> <number>75</number> <number>76</number> <number>73</number> <number>70</number> <number>62</number> <number>45</number> <number>32</number> <number>12</number>"; break; case "WED": print "<number>10</number> <number>30</number> <number>38</number> <number>50</number> <number>65</number> <number>80</number> <number>86</number> <number>92</number> <number>90</number> <number>88</number> <number>80</number> <number>75</number> <number>74</number> <number>75</number> <number>73</number> <number>72</number> <number>68</number> <number>69</number> <number>65</number> <number>66</number> <number>67</number> <number>70</number> <number>60</number> <number>50</number>"; break; case "THU": print "<number>10</number> <number>20</number> <number>21</number> <number>40</number> <number>60</number> <number>70</number> <number>72</number> <number>72</number> <number>75</number> <number>75</number> <number>70</number> <number>83</number> <number>80</number> <number>81</number> <number>80</number> <number>82</number> <number>75</number> <number>74</number> <number>70</number> <number>72</number> <number>71</number> <number>60</number> <number>50</number> <number>40</number>"; break; case "SAT": print "<number>5</number> <number>10</number> <number>12</number> <number>25</number> <number>30</number> <number>35</number> <number>40</number> <number>41</number> <number>42</number> <number>40</number> <number>45</number> <number>50</number> <number>45</number> <number>50</number> <number>55</number> <number>57</number> <number>50</number> <number>45</number> <number>43</number> <number>42</number> <number>41</number> <number>40</number> <number>30</number> <number>20</number>"; break; default: print "<number>9</number> <number>15</number> <number>16</number> <number>35</number> <number>55</number> <number>65</number> <number>80</number> <number>81</number> <number>82</number> <number>83</number> <number>75</number> <number>70</number> <number>65</number> <number>70</number> <number>65</number> <number>67</number> <number>60</number> <number>55</number> <number>53</number> <number>52</number> <number>51</number> <number>50</number> <number>40</number> <number>30</number>"; break; } ?> </row> </chart_data> <chart_rect x='300' y='50' width='100' height='200' positive_color='004488' positive_alpha='40' /> <chart_type>bar</chart_type> <draw> <text shadow='high' color='004488' alpha='35' size='25' x='295' y='26' width='400' height='150'><?php switch ( $_REQUEST['category'] ){ case "SUN": print "Sunday"; break; case "MON": print "Monday"; break; case "TUE": print "Tuesday"; break; case "WED": print "Wednesday"; break; case "THU": print "Thursday"; break; case "SAT": print "Saturday"; break; default: print "Friday"; break; } ?></text> </draw> <filter> <shadow id='low' distance='2' angle='45' color='0' alpha='50' blurX='4' blurY='4' /> <shadow id='high' distance='5' angle='45' color='0' alpha='50' blurX='10' blurY='10' /> </filter> <legend layout='hide' /> <series_color> <color>ffff44</color> </series_color> <series set_gap='40' /> </chart>