Skip to main content

Legend for Graphs

Comments

4 comments

  • Geneious Team

    Hi Adrian,

    It sounds like you want to implement the following:

    https://assets.geneious.com/developer/geneious/javadoc/latest/com/biomatters/geneious/publicapi/plugin/SequenceGraph.html#getScaleBarWidth--

    https://assets.geneious.com/developer/geneious/javadoc/latest/com/biomatters/geneious/publicapi/plugin/GeneiousGraphics2D.html

    This will allow you to draw whatever you want to the right of the name.  You could just draw the two strings in the colours you want.

    0
  • Adrian

    Hello Matthew,

     

     

    Thank you. That works perfectly. 

    Is there any way to set 

    @Override
    public int getScaleBarWidth() {
    return dynamically;
    }

    dynamically? I need a handle to graphics so I could get the fontMetrics
    and calculate the width of the longest sequence name string.

    Cheers,
    Adrian

    0
  • Matthew Cheung

    Hi Adrian,

    Sorry for the extremely late reply.  I just realised that I had been replying to posts using our shared Geneious Team account and didn't get notified of your responses.

    Anyway hopefully you already figured this one out.  There isn't really a way to do it dynamically so you should just return a value that you think is reasonably big enough.  If the sequence name extends beyond that then perhaps use "...".

    0
  • Adrian

    Hi Matt,

     

    I guess I'll leave it like as is. Maybe you could consider for further versions offering a way to access the Graphics context.

    That's fine with the late reply. As a company you are still one of the fastest respondents to the customer queries, well above industry standards.

     

     

    Cheers

    0

Please sign in to leave a comment.