How can I call the jFreeChart to plot graph and get the result in Servlet?

I want to use jFreeChart to plot time series graph, and then output the result in Servlet. How can I call the jFreeChart to plot graph and get back the result? Any source code for example? Thanks a lot!!

Dave,
ServletDemo1 and others were not in the distribution that I got (jfreechart-0.9.4). I found them under the premium demos somewhere in com/refinery/chart/demo/premium, but could not compile. They're complaining, among other things, about missing classes/packages com.refinery.date.SerialDate and com.refinery.ui. Am I using a wrong version of jfreechart?
Thanks,
-Alla
There is a very simple servlet demo in the JFreeChart
distribution:
src/com/jrefinery/chart/demo/ServletDemo1.java
This simply sends back an image to the browser.
A second demo, which embeds the chart in an HTML page
is:
src/com/jrefinery/chart/demo/ServletDemo2.java
src/com/jrefinery/chart/demo/ServletDemo2ChartGenerator
java
...includes a time series chart as one of three
options.
Regards,
Dave Gilbert
JFreeChart Project Leader
http://www.object-refinery.com/jfreechart/index.html

Similar Messages

  • Im switching email accounts on my itunes account am the computer isnt recognizing purchases made from my other account on the new one (apps). How can I sign in with my new account and get the purchases apps on both accounts?

    Im switching email accounts on my itunes account am the computer isnt recognizing purchases made from my other account on the new one (apps). How can I sign in with my new account and get the purchases apps on both accounts?

    This was EXACTLY what I needed about the purchases I made from my device. However, is there a way to re-download other ones you've made from a computer? Because I realized some of them were not just purchased from my device.
    This is a picture of what it looks like now:
    http://tinypic.com/r/107quxu/7
    As you can see, the stuff circled in red doesn't give me an option to download from Cloud Beta because it already says "downloaded".
    any way to get around that?

  • How can I add file attachment to my form and get the attachment by email?

    I'm using this code and it works fine, but I don't get the attachment file in the email. How can I add this to my code?
    HTML
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script>
    <script src="http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js" type="text/javascript"></script>
    <script type="text/javascript">// <![CDATA[
                  $(document).ready(function() {
                    $("#form1").validate({
                      rules: {
                        first: "required",// simple rule, converted to {required:true}
                        email: {// compound rule
                        required: true,
                        email: true
                      last: {
                        last: true
                      comment: {
                        required: true
                      messages: {
                        comment: "Please enter a comment."
    // ]]></script>
    <script type="text/javascript">// <![CDATA[
    function validate ()
              if (document.form1.first.value == "")
              alert("Please enter your First Name");
              document.form1.first.focus();
              document.form1.first.style.border="1px solid red";
              return false;
              else if (document.form1.last.value == "")
              alert("Please enter your Last Name");
              document.form1.last.focus();
              document.form1.last.style.border="1px solid red";
              return false;
              else if (document.form1.emailaddress.value == "")
              alert("Please enter your Email Address");
              document.form1.emailaddress.focus();
              document.form1.emailaddress.style.border="1px solid red";
              return false;
    function has_focus() {
        if(document.form1.first.value == "")
                                  document.form1.first.focus();
                                  document.form1.style.first.border="1px solid green";
    function set_focus(x)
              document.getElementById(x).style.border="1px solid #80CA75";
    function clear_focus(x)
              document.getElementById(x).style.border="1px solid #DBDFE6";
    // ]]></script>
    </head>
    <body>
    <p><span style="color: #666666; text-align: center; font-size: 13px;">Please complete this form if you have any technical issue.</span></p>
    <form id="form1" action="http://www.southsun.com/php/tech_issue.php" enctype="multipart/form-data" method="post">
    <table style="width: 850px; font-size: 15px; padding-left: 20px; text-align: center;" border="0">
    <tbody>
    <tr>
    <td style="text-align: left; padding-bottom: 20px;" colspan="2">
    <h2><span style="color: #666666;">Please complete this form if you have any technical issue.</span></h2>
    </td>
    </tr>
    <tr style="padding-top: 40px;">
    <td style="text-align: left;"><span style="color: #abaf6f;"><strong>First Name</strong>:*</span><input id="first1" name="first" type="text" />  <br /><br /> <span style="color: #abaf6f;"><strong>Last Name</strong>:*</span><input id="last1" name="last" type="text" /><br /><br /> <span style="color: #abaf6f; padding-right: 33px;"><strong>Email</strong>:</span><span style="color: #abaf6f;">*</span><input id="email1" name="email" type="text" /><br /><br /> <span style="color: #abaf6f;"><strong>Shipping Method:</strong><br /></span> <input name="shippingmethod" type="radio" value="prioritymail" /> Priority Mail                                                                 <input name="shippingmethod" type="radio" value="store" /> In Store Pick up <br /> <input name="shippingmethod" type="radio" value="ground" />  Ground                                                                       <input name="shippingmethod" type="radio" value="3day" /> 3 Day Select<br /><br /> <span style="color: #abaf6f;"><strong>Payment Method:</strong><br /></span> <input name="paymentmethod" type="radio" value="paypal" /> Paypal Method                                                       <input name="paymentmethod" type="radio" value="creditcard" /> Credit Card<br /> <strong><br /> <span style="color: #abaf6f;">If getting an error message, please explain the error:</span></strong><span style="color: #abaf6f;"> <br /></span> <textarea id="errormessage" cols="20" rows="2" name="errormessage"></textarea><br /><br /></td>
    <td style="border-left: 1px solid grey; padding-left: 40px; text-align: left;"><span style="color: #abaf6f;"><strong>If using Paypal, Were you redirected successfully?</strong><br /></span> <input name="paypalredirect" type="radio" value="yes" /> Yes                                                                 <input name="paypalredirect" type="radio" value="no" /> No<br /><br /> <span style="color: #abaf6f;"><strong>If using Credit Card, Did you get an error?</strong><br /></span> <input name="carderror" type="radio" value="yes" /> Yes                                                                  <input name="carderror" type="radio" value="no" /> No<br /><br /> <span style="color: #abaf6f;"><strong>What happened after clicking place order? </strong><br /></span> <textarea id="placeorder1" cols="20" rows="2" name="placeorder"></textarea><br /><br /> <span style="color: #abaf6f;"><strong>Comments</strong>: <br /></span> <textarea id="comments1" cols="20" rows="2" name="strcomments"></textarea><br /><br /> <span style="color: #abaf6f;"><strong>Attach PrintScreen</strong>: <br /></span> <input name="strresume" type="file" />
    <div style="height: 50px;"> </div>
    </td>
    </tr>
    <tr>
    <td style="padding-top: 20px;" colspan="2">( * ) indicates required fields</td>
    </tr>
    <tr>
    <td style="text-align: center; padding-top: 20px;" colspan="2"><input class="button" name="submit" type="submit" value="Submit" />                        <input class="button" name="reset" type="reset" value="Reset" /></td>
    </tr>
    </tbody>
    </table>
    </form>
    </body></html>
    PHP
    <?php
    echo $savestring;
    //--------------------------paramaters--------------------------
    // Subject of email sent to you.
    $subject = 'prueba con uploads';
    // Your email address. This is where the form information will be sent.
    $emailadd = '[email protected]';
    // Where to redirect after form is processed.
    $url = 'http://www.pch-graphicdesign.com';
    // Makes all fields required. If set to '1' no field can not be empty. If set to '0' any or all fields can be empty.
    $req = '0';
    $target_path = "http://www.pch-graphicdesign.com/php/uploads/";
    $target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
    $text = "Results from form:\n\n";
    $space = ' ';
    $line = '
    foreach ($_POST as $key => $value)
    if ($req == '1')
    if ($value == '')
    {echo "$key is empty";die;}
    $j = strlen($key);
    if ($j >= 20)
    {echo "Name of form element $key cannot be longer than 20 characters";die;}
    $j = 20 - $j;
    for ($i = 1; $i <= $j; $i++)
    {$space .= ' ';}
    $value = str_replace('\n', "$line", $value);
    $conc = "{$key}:$space{$value}$line";
    $text .= $conc;
    $space = ' ';
    mail($emailadd, $subject, $text, 'From: '.$emailadd.'');
    echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';
    ?>

    Sending a file as an attachment to an email involves setting the correct MIME type and headers. There's a brief tutorial here: http://webcheatsheet.com/php/send_email_text_html_attachment.php.
    Also, you need to use the same name as in your form. In the script you have shown here, the name of the file field is strresume, but your processing script uses this: $_FILES['uploadedfile']['name']. It should be this: $_FILES['strresume']['name']

  • How can I use apple mail (linked to gmail) and get it to only do autofill on the contacts that I have in apple address book?

    How can I use apple mail (linked to gmail) and get it to only do autofill on the contacts that I have in apple address book? Everytime I write an email on the Apple mail app (as well as in Gmail) it recommends a bunch of emails that are not my contacts. I want it to just autofill for the contacts that I have in my address book. Is this possible? Thank you. I have an Imac Intel version and an Iphone 5 phone.

    Mail > Window > Previous Recipients

  • How can i open a DOC or TXT file and insert the data into table?

    How can i open a DOC or TXT file and insert the data into table?
    I have a doc file . the doc include some columns and some rows.(for example 'ID,Name,Date,...').
    I'd like open DOC file and I'd like insert them into the table with same columns.
    Thanks.

    Use the SQL*Loader utility or the UTL_FILE package.

  • I have a 2008 macbook and i lost the start up disk and forgot the password. how can i put it back to factory mode and change the password

    i have a 2008 macbook and i lost the start up disk and forgot the password. how can i put it back to factory mode and change the password

    Check out this article http://gigaom.com/apple/reset-os-x-password-without-an-os-x-cd/

  • I live in Germany at the moment. How can I buy iPad mini with retina online and  get tax free?

    I live in Germany at the moment. How can I buy iPad mini with retina online and  get tax free?

    Do you qualify for a tax free purchase?  The online stores will collect the required taxes for their country and region.  I know in the USA, if you are a tax free corporation, and you purchase it directly with a corporate account, you can get an item tax free using the company account and the corporations registered tax exempt number.  But an individual citizen cannot avoid paying the appropriate required taxes when shopping the online Apple web store.

  • I'm trying to download the latest version of iTunes and get the message "There is a problem with this Windows Installer package. A program required for this install to complete could not be run." I have no clue what to do with this.

    I'm trying to download the latest version of iTunes and get the message "There is a problem with this Windows Installer package. A program required for this install to complete could not be run." I have no clue what to do with this to resolve the issue. Thanks for any help!

    Repair your Apple software update.
    Go to START > ALL PROGRAMS > Apple Software Update. If it offers you a newer version of Apple Software Update, do it but Deselect any other software offered at the same time. Once done, try another iTunes install
    If you don't find ASU, go to Control Panel:
    START > CONTROL PANEL/ > Add n Remove Programs, highlight ASU and click CHANGE then REPAIR

  • How can I stop firefox from checking add-ons and displaying the What's new page each time I launch it

    Since upgrading to the latest version, I have viewed read and interacted with everything on the What's new page. I have done this a number of times but the page is still opened each time I launch Firefox. In addition it shows my homepage in a second tab.
    Prior to opening Firefox it checks for add-ons.

    hello Michells, this will likely be caused by the user.js file in your profile folder.
    go to the firefox ''menu ≡ > help ? > troubleshooting information'', click on ''profile folder/show folder'' and close all firefox windows afterwards. a windows explorer window should open up - in there delete the file named '''user.js''' and restart the browser afterwards.
    [[How to fix preferences that won't save]]

  • How to sample an analog signal, simulated on labview and get the sample values.

    My project involves this particular detail where i have to sample a simulated sine wave and get the samples and compare them so as to select a particular length for hanning window.Then it also requires me to experiment with the window size so as to get more efficient data out of the sampled signals. please help me with the sampling part and guide me as to how to perform a hanning window operation on the sampled signal. I have directly used the spectral analysis tool which involves getting a FFT spectrum by a default hanning window setting. But since i have to experiment with the window size and variations, guide me with the sampling part and applying a separate hanning window. Thank you.

    bhardoo wrote:
    My project involves this particular detail where i have to sample a simulated sine wave and get the samples and compare them so as to select a particular length for hanning window.Then it also requires me to experiment with the window size so as to get more efficient data out of the sampled signals. please help me with the sampling part and guide me as to how to perform a hanning window operation on the sampled signal. I have directly used the spectral analysis tool which involves getting a FFT spectrum by a default hanning window setting. But since i have to experiment with the window size and variations, guide me with the sampling part and applying a separate hanning window. Thank you.
    What do you mean by i have to sample a simulated sine wave?
    the sine generator will provide you with a waveform (or an array of values you can use), there are basic  vis to do all this, rigth click on the vi and select help to get detailed information.
    Post your vi if you have trouble with details.
    How much do you know about LabVIEW and signal theorie?
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

  • How can I call a specific search help from and still get all the tabs

    hello
    I use F4IF_FIELD_VALUE_REQUEST to display a specific search help from my program. This search help is included in a collective search help, but only the one specified search help is displayed.
    Is it possible to call the collective search help and display one specific search help ?
    Example: in CRM i have a collective search help BUPA. When F4 is issued from a customer field the search help "Search customer" should be displayed, and not the last search help which was activated - i.e.. "Search employee".
    best regards
    Peter Christiansen

    Hi,
    you can try some thing like this..
          CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
            EXPORTING
              TABNAME           = 'KNA1'
              FIELDNAME         = 'KUNNR'
              SEARCHHELP        = 'DEBI'
            TABLES
              RETURN_TAB        = LT_RETURN
            EXCEPTIONS
              FIELD_NOT_FOUND   = 1
              NO_HELP_FOR_FIELD = 2
              INCONSISTENT_HELP = 3
              NO_VALUES_FOUND   = 4
              OTHERS            = 5.
          IF SY-SUBRC <> 0.
            MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
              WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
    Regards
    vijay

  • How can I convert files in Aperture to jpegs and keep the file large

    I want to upload files into istock photo and they must be as big as possible but in jpg format. I end up exporting tiny little things going from 8mb to 300kb. How can I do it? I even tried going into CS3 but that only allowed me to convert to tif. I would appreciate any help - especially if it is simple!

    Go to File >> Export >> Export Version(s)
    In the resulting dialog box you'll find a drop down called Export Preset with a list of presets. One of them is JPEG Original Size. That should do it for you.
    Also you can choose Edit at the bottom of the preset list and modify an existing preset or create a new custom preset.
    BTW: the reason you couldn't do it in Photoshop is that you need to convert it from 16bit to 8bit before you can save a JPEG. That command in Photoshop is under Image>>Mode.
    DLS

  • How can one edit a .gif file graphics background and change the fonts in Photoshop Elements 13?

    I am trying to change the color and fonts of some of my web sites .gif files. Can I change the color to another hexadecimal color and change the fonts of the letters in Photoshop 13? I am using Windows 7 and heard that you could save the .gif file to another format, edit it, then change the file back to a .gif file. Is this true? If so, how do you do it? The file just has a solid color with the letters "Firm " on it. No animation.

    You can edit a gif without changing the format, but once you save the file as a gif the text becomes part of the image, not text anymore, so you would need to clone or heal away the existing text and then create a new text layer and use save for web to create a new gif.
    For access to the most editing tools, while the file is open in the editor go to image>mode and change it from index color to RGB. Saving as a gif will change it back to index mode.

  • HT2589 How can I Change my apple id (email adress) and keep the same account? Or do I have to create a whole new account?

    My email address was hacked and I can no longer use it. How can I change the email address with our loosing everything on my iTunes account?

    Sign out of your Apple ID on all your services & devices, especially iCloud on your iPhone.
    Go to id.apple.com.
    Log in with your Apple ID & password.
    Then, edit your primary email address to the new email account.
    Once you do so, a verification email will be sent to the new email address.
    Go to your email account and verify the new primary email address.
    Apple ID: Changing your Apple ID

  • How can I import an Aperture Catalog into Lightroom and retain the RAW file as well as the files with the edits?

    I have several catalogs in Aperture that I would like to import to Lightroom 5 and I want to retain the original RAW files as well as the files with the edits.  How can I do this?

    Well, you can bring in the raw file (without edits), and you can bring in a rendered RGB file (e.g. jpeg or tiff) with edits baked in, but what you CAN'T do is bring in a raw file, with the non-destructive Aperture edits, and have Lr translate those Aperture edits into Lightroom edits.
    Put another way: no raw converter/editor can understand the edits of any other raw converter/editor. So, you have to work with a rendered version, and/or re-edit from scratch in a new raw converter/editor.
    PS - it would be feasible to write a rough translator which approximated raw edits in one world into edits in another, but such does not exist yet for Aperture -> Lightroom, that I know of.

Maybe you are looking for