Class ChartUtils


  • public class ChartUtils
    extends java.lang.Object
    Utility class for chart related stuff.
    Version:
    $Id: ChartUtils.java,v 1.3 2008/04/02 11:22:15 benoitx Exp $
    Author:
    Richard Cyganiak
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.awt.Color getStringColor​(java.lang.String s)
      Returns a distinct Color for a String argument.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getStringColor

        public static java.awt.Color getStringColor​(java.lang.String s)
        Returns a distinct Color for a String argument. The algorithm tries to provide different colors for similar strings, and will return equal colors for equal strings. The colors will all have similar brightness and maximum intensity. Useful for chart coloring.
        Parameters:
        s - a String to get a color for
        Returns:
        a distinct Color for a String argument. The algorithm tries to provide different colors for similar strings, and will return equal colors for equal strings. The colors will all have similar brightness and maximum intensity. Useful for chart coloring.