Jfreechart, symbolAxis and state encode

Discussion in 'Java' started by etantonio, Mar 9, 2009.

  1. etantonio

    etantonio Guest

    Good Evening for a chart concerning four three state I want to use
    JFreeChart and symbolAxis,
    my problem is that I've the following code values :

    1 RX comando

    2 PLL agganciato

    3 PLL sganciato


    while using symbolAxis it automatically give the following encode :

    0 RX comando

    1 PLL agganciato

    2 PLL sganciato


    my question is how to have an arbitrary code associated with the
    labels ?
    There's a way ??

    Thanks,

    Antonio
    www.etantonio.it/en
     
    etantonio, Mar 9, 2009
    #1
    1. Advertising

  2. In article
    <>,
    etantonio <> wrote:

    > Good Evening for a chart concerning four three state I want to use
    > JFreeChart and symbolAxis, my problem is that I've the following code
    > values :
    >
    > 1 RX comando
    > 2 PLL agganciato
    > 3 PLL sganciato
    >
    >
    > while using symbolAxis it automatically give the following encode :
    >
    > 0 RX comando
    > 1 PLL agganciato
    > 2 PLL sganciato
    >
    > my question is how to have an arbitrary code associated with the
    > labels ? There's a way ??


    The SymbolAxis constructor takes an array of String values, which can
    include any characters you want:

    <http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/axis/SymbolA
    xis.html>

    I don't see how SymbolAxis would alter your choices. Perhaps an
    <http://pscode.org/sscce.html> would help.

    --
    John B. Matthews
    trashgod at gmail dot com
    <http://sites.google.com/site/drjohnbmatthews>
     
    John B. Matthews, Mar 10, 2009
    #2
    1. Advertising

  3. etantonio

    etantonio Guest

    the array of String values for me contains "RX comando" , "PLL
    agganciato", "PLL sganciato"
    from my engine arrive to this chart just the values 1,2,3 so I
    couldn't pass it directly to the chart,
    that would be nice if I could give to SymbolAxis a similar array that
    tells the value associated with the corresponding label.

    Antonio
    www.etantonio.it
     
    etantonio, Mar 10, 2009
    #3
  4. In article
    <>,
    etantonio <> wrote:

    I wrote:

    <http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/axis/SymbolAxis.html>

    > the array of String values for me contains "RX comando" , "PLL
    > agganciato", "PLL sganciato" from my engine arrive to this chart just
    > the values 1,2,3 so I couldn't pass it directly to the chart, that
    > would be nice if I could give to SymbolAxis a similar array that
    > tells the value associated with the corresponding label.


    I guess you could set the symbol for value zero to the empty string and
    negate setAutoRangeIncludesZero. Tinkering with setAxisOffset might be
    helpful, too. Also, try searching the demos for "SymbolAxis".

    Of course, without seeing your <http://pscode.org/sscce.html>,
    I'm guessing.

    --
    John B. Matthews
    trashgod at gmail dot com
    <http://sites.google.com/site/drjohnbmatthews>
     
    John B. Matthews, Mar 10, 2009
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lordy
    Replies:
    1
    Views:
    1,160
    Lordy
    Sep 13, 2003
  2. Shripathi Kamath

    Question on JFreeChart and Batik

    Shripathi Kamath, Nov 26, 2003, in forum: Java
    Replies:
    0
    Views:
    2,324
    Shripathi Kamath
    Nov 26, 2003
  3. Bruno

    JFreeChart

    Bruno, Apr 7, 2004, in forum: Java
    Replies:
    1
    Views:
    664
    Chris Smith
    Apr 7, 2004
  4. Jochen Riekhof
    Replies:
    5
    Views:
    761
    Jochen Riekhof
    Jun 4, 2004
  5. Robert M. Gary

    JFreechart lines and points?

    Robert M. Gary, Sep 8, 2006, in forum: Java
    Replies:
    0
    Views:
    3,802
    Robert M. Gary
    Sep 8, 2006
Loading...

Share This Page