Skip to main content

Legend for Graphs



  • Geneious Team

    Hi Adrian,

    It sounds like you want to implement the following:

    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.

  • Adrian

    Hello Matthew,



    Thank you. That works perfectly. 

    Is there any way to set 

    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.


  • 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 "...".

  • 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.





Please sign in to leave a comment.