// Path: src/main/java/no/uib/jsparklines/renderers/util/GradientColorCoding.java
// public enum ColorGradient {
// 
//     /**
//      * Red via black to green.
//      */
//     RedBlackGreen, 
//     /**
//      * Green via black to red.
//      */
//     GreenBlackRed, 
//     /**
//      * Green via black to blue.
//      */
//     GreenBlackBlue, 
//     /**
//      * Blue via black to green.
//      */
//     BlueBlackGreen, 
//     /**
//      * Green via black to yellow.
//      */
//     GreenBlackYellow,
//     /**
//      * Yellow via black to green.
//      */
//     YellowBlackGreen, 
//     /**
//      * Green via black to purple.
//      */
//     GreenBlackPurple, 
//     /**
//      * Purple via black to green.
//      */
//     PurpleBlackGreen, 
//     /**
//      * Red via black to magenta.
//      */
//     RedBlackMagenta, 
//     /**
//      * Magenta via black to red.
//      */
//     MagentaBlackRed,
//     /**
//      * Blue via black to red.
//      */
//     BlueBlackRed, 
//     /**
//      * Red via black to blue.
//      */
//     RedBlackBlue, 
//     /**
//      * Green via white to red.
//      */
//     GreenWhiteRed, 
//     /**
//      * Red via white to green.
//      */
//     RedWhiteGreen, 
//     /**
//      * Blue via white to red.
//      */
//     BlueWhiteRed, 
//     /**
//      * Red via white to blue.
//      */
//     RedWhiteBlue,
//     /**
//      * Green via white to blue.
//      */
//     GreenWhiteBlue, 
//     /**
//      * Blue via white to green.
//      */
//     BlueWhiteGreen
// }


import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.util.ArrayList;
import javax.swing.BoxLayout;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellRenderer;
import no.uib.jsparklines.data.StartIndexes;
import no.uib.jsparklines.renderers.util.GradientColorCoding.ColorGradient;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.renderer.category.IntervalBarRenderer;
import org.jfree.chart.renderer.category.LayeredBarRenderer;
import org.jfree.chart.renderer.category.StackedBarRenderer;
import org.jfree.chart.renderer.category.StandardBarPainter;
import org.jfree.data.category.DefaultCategoryDataset;

    /**
     * Set the color gradient to use for the intervals. To disable the color
     * gradient use null as the parameter. <br><br> Values below zero uses the
     * first color in the gradient name, while values above zero uses the third
     * color in the gradient. <br><br> Note that the max value is set to the
     * maximum absolute value of the max and min values in order to make the
     * color gradient equal on both sides.
     *
     * @param colorGradient the color gradient to use, null disables the color
     * gradient
     */
    public void setGradientColoring(ColorGradient colorGradient) {
        setGradientColoring(colorGradient, null);
    }

    /**
     * Set the color gradient to use for the intervals. To disable the color
     * gradient use null as the parameter. <br><br> Values below zero uses the
     * first color in the gradient name, while values above zero uses the third
     * color in the gradient. <br><br> Note that the max value is set to the
     * maximum absolute value of the max and min values in order to make the
     * color gradient equal on both sides.
     *
     * @param colorGradient the color gradient to use, null disables the color
     * gradient
     * @param plotBackgroundColor the background color to use, for gradients
     * using white as the "middle" color, it's recommended to use a dark
     * background color
     */
// Path: src/main/java/no/uib/jsparklines/renderers/util/GradientColorCoding.java
// public enum ColorGradient {
// 
//     /**
//      * Red via black to green.
//      */
//     RedBlackGreen, 
//     /**
//      * Green via black to red.
//      */
//     GreenBlackRed, 
//     /**
//      * Green via black to blue.
//      */
//     GreenBlackBlue, 
//     /**
//      * Blue via black to green.
//      */
//     BlueBlackGreen, 
//     /**
//      * Green via black to yellow.
//      */
//     GreenBlackYellow,
//     /**
//      * Yellow via black to green.
//      */
//     YellowBlackGreen, 
//     /**
//      * Green via black to purple.
//      */
//     GreenBlackPurple, 
//     /**
//      * Purple via black to green.
//      */
//     PurpleBlackGreen, 
//     /**
//      * Red via black to magenta.
//      */
//     RedBlackMagenta, 
//     /**
//      * Magenta via black to red.
//      */
//     MagentaBlackRed,
//     /**
//      * Blue via black to red.
//      */
//     BlueBlackRed, 
//     /**
//      * Red via black to blue.
//      */
//     RedBlackBlue, 
//     /**
//      * Green via white to red.
//      */
//     GreenWhiteRed, 
//     /**
//      * Red via white to green.
//      */
//     RedWhiteGreen, 
//     /**
//      * Blue via white to red.
//      */
//     BlueWhiteRed, 
//     /**
//      * Red via white to blue.
//      */
//     RedWhiteBlue,
//     /**
//      * Green via white to blue.
//      */
//     GreenWhiteBlue, 
//     /**
//      * Blue via white to green.
//      */
//     BlueWhiteGreen
// }


// Path: src/main/java/no/uib/jsparklines/renderers/JSparklinesMultiIntervalChartTableCellRenderer.java
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.util.ArrayList;
import javax.swing.BoxLayout;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellRenderer;
import no.uib.jsparklines.data.StartIndexes;
import no.uib.jsparklines.renderers.util.GradientColorCoding.ColorGradient;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.renderer.category.IntervalBarRenderer;
import org.jfree.chart.renderer.category.LayeredBarRenderer;
import org.jfree.chart.renderer.category.StackedBarRenderer;
import org.jfree.chart.renderer.category.StandardBarPainter;
import org.jfree.data.category.DefaultCategoryDataset;


    /**
     * Set the color gradient to use for the intervals. To disable the color
     * gradient use null as the parameter. <br><br> Values below zero uses the
     * first color in the gradient name, while values above zero uses the third
     * color in the gradient. <br><br> Note that the max value is set to the
     * maximum absolute value of the max and min values in order to make the
     * color gradient equal on both sides.
     *
     * @param colorGradient the color gradient to use, null disables the color
     * gradient
     */
    public void setGradientColoring(ColorGradient colorGradient) {
        setGradientColoring(colorGradient, null);
    }

    /**
     * Set the color gradient to use for the intervals. To disable the color
     * gradient use null as the parameter. <br><br> Values below zero uses the
     * first color in the gradient name, while values above zero uses the third
     * color in the gradient. <br><br> Note that the max value is set to the
     * maximum absolute value of the max and min values in order to make the
     * color gradient equal on both sides.
     *
     * @param colorGradient the color gradient to use, null disables the color
     * gradient
     * @param plotBackgroundColor the background color to use, for gradients
     * using white as the "middle" color, it's recommended to use a dark
     * background color
     */
    public void setGradientColoring(ColorGradient colorGradient, Color plotBackgroundColor) {