this is my latest working concept... although I don't think it's
optimized at all, and I'm really hacking to get my concept across

http://www.monkeypuzzle.net/testfiles/jquery/flot/flot-test-11.htm

the favorites button should really load the data into the inputs, but
I don't yet understand how to go that direction. Also, the bars graph
doesn't work, probably because I need to set up the x-axis better.

Struggling to learn better javascript, so if you have any thoughts I'd
love to hear them!



On Sep 3, 11:03 am, "faizal iqbaal" <[EMAIL PROTECTED]> wrote:
> cool...let me have the code as well i'll also learn a new approach  or is it
> the same url
>
>
>
> On Wed, Sep 3, 2008 at 1:30 PM, rolfsf <[EMAIL PROTECTED]> wrote:
>
> > Yes - thanks Faizal. At least it pointed out the error I was making.
> > I'm not (currently) using $.extend, but I did separate the data set
> > options from the other chart options, and put them in a variable. Now
> > I'm trying to add a select that will allow the user to switch chart
> > styles - point, line, bar
>
> > On Sep 2, 10:19 pm, "faizal iqbaal" <[EMAIL PROTECTED]> wrote:
> > > did it work for ya
>
> > > On Tue, Sep 2, 2008 at 5:31 PM, faizal iqbaal <[EMAIL PROTECTED]
> > >wrote:
>
> > > > //modiefd ur file copy the code and run it
>
> > > > /**************/
>
> > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
> > > >http://www.w3.org/TR/html4/loose.dtd";>
> > > > <html>
> > > >     <head>
> > > >     <style type="text/css">
>
> > > >     #graphHolder {
> > > >         border: none;
> > > >         padding: 0px;
> > > >         margin: 10px;
> > > >         height: 200px;
> > > >         width: 400px;
> > > >         font-family: tahoma;
> > > >         font-size: 11px;
> > > >     }
>
> > > >     #curveData {
> > > >         margin: 10px;
> > > >     }
>
> > > >     </style>
> > > >         <title></title>
> > > >         <script language="JavaScript" type="text/javascript"
> > > > src="jquery.js"></script>
> > > >         <script language="JavaScript" type="text/javascript"
> > > > src="jquery.flot.js"></script>
> > > >         <!--[if IE]><script language="javascript"
> > type="text/javascript"
> > > > src="../version/scripts/flot/excanvas.js"></script><![endif]-->
>
> > > >         <script type="text/javascript">
>
> > > >             $().ready(function(){
>
> > > >                 $.plot($("#graphHolder"),[]);
>
> > > >                 $('#curveData input').change(function() {
> > > >                     var d1 = [];
> > > >                     $('#curveData tbody tr').each(function() {
> > > >                         tr = $(this);
> > > >                         pair = [];
> > > >                         tr.find('input.qty').val() &&
> > > > tr.find('input.price').val() && pair.push( tr.find('input.qty').val(),
> > > > tr.find('input.price').val() ) && d1.push( pair );
> > > >                     });
>
> > > >                     var chartOptions={
> > > >                             yaxis: { min:0 },
> > > >                             color: "#bb0000",
> > > >                             data: d1,
> > > >                             points: { show: true },
> > > >                             lines: { show: true, fill: true, fillColor:
> > > > "rgba(255, 000, 000, 0.2)" }
> > > >                         } ;
>
> > > >                     /*
> > > >                     $.plot($("#graphHolder"), [
> > > >                         {
> > > >                             yaxis: { min:0 },
> > > >                             color: "#bb0000",
> > > >                             data: d1,
> > > >                             points: { show: true },
> > > >                             lines: { show: true, fill: true, fillColor:
> > > > "rgba(255, 000, 000, 0.2)" }
> > > >                         }
> > > >                     ]);
> > > >                     */
> > > >                     $.plot($("#graphHolder"), [{ data: d1,
> > > > color:"#bb0000"}],$.extend(true, {}, chartOptions, {yaxis: { min: 0
> > }}));
>
> > > >                 });
>
> > > >             });
> > > >         </script>
>
> > > >     </head>
> > > >     <body>
> > > >             <table cellpadding="0" cellspacing="0" id="curveData">
> > > >             <thead>
> > > >                 <tr>
> > > >                     <th>#</th>
> > > >                     <th>Quantity</th>
>
> > > >                     <th>Price</th>
> > > >                 </tr>
> > > >             </thead>
> > > >             <tbody>
> > > >                 <tr>
> > > >                     <td>1</td>
> > > >                     <td><input type="text" class="qty"
> > > > size="8"></input></td>
> > > >                     <td><input type="text" class="price"
> > > > size="8"></input></td>
>
> > > >                 </tr>
> > > >                 <tr>
> > > >                     <td>2</td>
> > > >                     <td><input type="text" class="qty"
> > > > size="8"></input></td>
> > > >                     <td><input type="text" class="price"
> > > > size="8"></input></td>
> > > >                 </tr>
> > > >                 <tr>
> > > >                     <td>3</td>
>
> > > >                     <td><input type="text" class="qty"
> > > > size="8"></input></td>
> > > >                     <td><input type="text" class="price"
> > > > size="8"></input></td>
> > > >                 </tr>
> > > >                 <tr>
> > > >                     <td>4</td>
> > > >                     <td><input type="text" class="qty"
> > > > size="8"></input></td>
> > > >                     <td><input type="text" class="price"
> > > > size="8"></input></td>
> > > >                 </tr>
>
> > > >                 <tr>
> > > >                     <td>5</td>
> > > >                     <td><input type="text" class="qty"
> > > > size="8"></input></td>
> > > >                     <td><input type="text" class="price"
> > > > size="8"></input></td>
> > > >                 </tr>
> > > >                 <tr>
> > > >                     <td>6</td>
> > > >                     <td><input type="text" class="qty"
> > > > size="8"></input></td>
>
> > > >                     <td><input type="text" class="price"
> > > > size="8"></input></td>
> > > >                 </tr>
> > > >                 <tr>
> > > >                     <td>7</td>
> > > >                     <td><input type="text" class="qty"
> > > > size="8"></input></td>
> > > >                     <td><input type="text" class="price"
> > > > size="8"></input></td>
> > > >                 </tr>
> > > >                 <tr>
>
> > > >                     <td>8</td>
> > > >                     <td><input type="text" class="qty"
> > > > size="8"></input></td>
> > > >                     <td><input type="text" class="price"
> > > > size="8"></input></td>
> > > >                 </tr>
> > > >                 <tr>
> > > >                     <td>9</td>
> > > >                     <td><input type="text" class="qty"
> > > > size="8"></input></td>
> > > >                     <td><input type="text" class="price"
> > > > size="8"></input></td>
>
> > > >                 </tr>
> > > >                 <tr>
> > > >                     <td>10</td>
> > > >                     <td><input type="text" class="qty"
> > > > size="8"></input></td>
> > > >                     <td><input type="text" class="price"
> > > > size="8"></input></td>
> > > >                 </tr>
> > > >                 <tr>
> > > >                     <td>11</td>
>
> > > >                     <td><input type="text" class="qty"
> > > > size="8"></input></td>
> > > >                     <td><input type="text" class="price"
> > > > size="8"></input></td>
> > > >                 </tr>
> > > >             </tbody>
> > > >         </table>
>
> > > >         <!--<button id="plot">Plot Graph</button>-->
>
> > > >         <div id="graphHolder" width="300px" height="300px"></div>
>
> > > >     </body>
>
> > > > </html>
>
> > > > /**************/
>
> > > > On Tue, Sep 2, 2008 at 4:49 PM, rolfsf <[EMAIL PROTECTED]> wrote:
>
> > > >> Thanks Faizal
>
> > > >> I tried setting the x and y axis with the min option, but it doesn't
> > > >> seem to work... perhaps I've got some syntax wrong
>
> > > >>http://monkeypuzzle.net/testfiles/jquery/flot/flot-test-3.htm
>
> > > > --
> > > > Thanks & Regards
> > > > Faizal
> > > > (001)919 889 1980
> > > > when nothing works , prayer does.
>
> > > --
> > > Thanks & Regards
> > > Faizal
> > > (001)919 889 1980
> > > when nothing works , prayer does.
>
> --
> Thanks & Regards
> Faizal
> (001)919 889 1980
> when nothing works , prayer does.

Reply via email to