Changeset 9295


Ignore:
Timestamp:
02/03/09 17:33:11 (16 years ago)
Author:
aparavac
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/datacenter/db
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/db/plot.php

    r9249 r9295  
    4141
    4242//set up plot
    43 $c= new XYChart(640,400);//, 0xeeeeee, 0x000000, 1);
     43if (empty($_GET["x"]))
     44    $x=640;
     45else
     46    $x=$_GET["x"];
     47if (empty($_GET["y"]))
     48    $y=400;
     49else
     50    $y=$_GET["y"];
     51
     52$c= new XYChart($x,$y);//, 0xeeeeee, 0x000000, 1);
     53$c->setPlotArea(70, 45, $x-100, $y-100, 0xffffff, -1, 0xcccccc, 0xccccccc);
     54//$c= new XYChart(440,250);//, 0xeeeeee, 0x000000, 1);
     55//$c->setPlotArea(70, 45, 340, 150, 0xffffff, -1, 0xcccccc, 0xccccccc);
    4456//$c->setRoundedFrame();
    45 $c->setPlotArea(70, 45, 540, 300, 0xffffff, -1, 0xcccccc, 0xccccccc);
    4657
    4758//size of the symbols
  • trunk/MagicSoft/Mars/datacenter/db/plotdb.php

    r9127 r9295  
    3636            || ($_GET["prim"]==$column && $num==3)
    3737            || ($_GET["prim"]==$column && $num==4)
    38             || ($_GET["prim"]==$column && $_GET["plot"]=="val" && $num==2))
     38            || ($_GET["prim"]==$column && $_GET["plot"]=="val" && $num==2)
     39            || (empty($_GET["prim"]) && $column=="fSequenceFirst"))
    3940            printf("<div id='%s%s' style='display:inline'>\n", $column, $num);
    4041        else
     
    112113        $_GET["set"]="";
    113114
    114     printf("<center>\n<table cellpadding='0'>\n");
    115     printf("<tr><td align='left'>\n");
     115    if (empty($_GET["x"]))
     116        $totalx=640+410;
     117    else
     118        $totalx=$_GET["x"]+410;
     119   
     120    printf("<center>\n<table cellpadding='0' width='%s'>\n", $totalx);
     121    printf("<tr><td align='left' width='410px'>\n");
    116122    printf("<form style='margin-bottom:0;' action='plotdb.php' METHOD='GET'>\n");
    117123
    118124    printf("&nbsp;<input type='radio' name='plot' value='prim' onclick='hidepulldown2()' %s> vs primary &nbsp;", $_GET["plot"]=="prim" ? "checked" : "");
    119     printf("&nbsp;<input type='radio' name='plot' value='val' onclick='showpulldown2()' %s> vs value <br><br>", $_GET["plot"]=="val" ? "checked" : "");
     125    printf("&nbsp;<input type='radio' name='plot' value='val' onclick='showpulldown2()' %s> vs value <br><br>", ($_GET["plot"]=="val" || empty($_GET["plot"])) ? "checked" : "");
    120126
    121127    printf("<table>\n");
     
    144150    foreach($prims as $primary => $column)
    145151        PrintDiv($host, $user, $pw, $db, $column, $tables, "2");
    146     if ($_GET["plot"]=="val")
     152//    if ($_GET["plot"]=="val")
     153    if ($_GET["plot"]=="val" || empty($_GET["plot"]))
    147154        printf(" </td><td valign='top'>\n <div id='Range2' style='display:inline'>\n ");
    148155    else
     
    180187        printf("<div id='set2' style='display:none'>Set2: <input name='Set2' type='text' size='20' maxlength='150' value='%s'>\n</div>\n<br>\n", $_GET["Set2"]);
    181188
    182     printf("<br><input class='Width' type='submit' value='Query Plot'><br>\n");
     189    printf("<br>Plot format: &nbsp; x = <select name='x' size='1'>\n");
     190    $x = array( 740, 640, 540, 440);
     191    foreach($x as $key => $el)
     192        if ($_GET["x"]==$el || (empty($_GET["x"]) && $el==640))
     193            printf("<option value='%s' selected>%s</option>\n", $el, $el);
     194        else
     195            printf("<option value='%s'>%s</option>\n", $el, $el);
     196    printf("</select>\n ");
     197
     198    printf("&nbsp; y = <select name='y' size='1'>\n");
     199    $y= array( 600, 500, 400, 300);
     200    foreach($y as $key => $el)
     201        if ($_GET["y"]==$el || (empty($_GET["y"]) && $el==400))
     202            printf("<option value='%s' selected>%s</option>\n", $el, $el);
     203        else
     204            printf("<option value='%s'>%s</option>\n", $el, $el);
     205    printf("</select>\n");
     206
     207    printf("<br><br><input class='Width' type='submit' value='Query Plot'> &nbsp;\n");
    183208    printf("<input class='Width' type='button' value='Reset' onClick='self.location.href=\"plotdb.php\"'><br>\n");
    184209
     
    186211    printf("</td>\n");
    187212
    188     printf("<td align='right' width='640px' height='400px'>\n");
     213//    printf("<td align='right' width='640px' height='400px'>\n");
     214    printf("<td align='right'>\n");
    189215    if (!empty($_GET))
    190216    {
     
    207233    printf("</td></tr>\n");
    208234    printf("<tr><td colspan='2'>\n");
    209     printf("some remarks:\n<ul>");
     235    printf("<br>some remarks:\n<ul>");
    210236    printf("<li>For Runs plotting the whole range (i.e. without giving a range or when giving a too large range) \n");
    211237    printf("doesn't work with ChartDirector.</li>\n");
Note: See TracChangeset for help on using the changeset viewer.