psdi.webclient.beans.kpi

Class KPITrendGraph

  • java.lang.Object
    • psdi.webclient.beans.kpi.KPITrendGraph


  • public class KPITrendGraph
    extends java.lang.Object
    This class generates Trend chart for the KPI(s).
    • Constructor Summary

      Constructors 
      Constructor and Description
      KPITrendGraph(java.util.List kpis, java.util.Date from, java.util.Date to, java.lang.String range, long mainKPI, WebClientSession clientsession) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.String getColor(int i)
      Returns next available color to draw the chart
      java.util.Vector getDates(int datePart, int points, java.util.GregorianCalendar g, int skip)
      Returns a string of labels for dates
      int getXIncrement()
      Adds a number of days, months, years etc based on range of the KPIHistory Sets
      LineChartData makeChartData()
      Returns an object of type Map that will be passed to the jsp for dojo chart image generation
      LineChartData.LineChartItem makeLineData(MboRemote kpi, MboSetData historyData, int i, java.util.Date startDate)
      Instantiate a new Line set, set its properties and data
      • Methods inherited from class java.lang.Object

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

      • KPITrendGraph

        public KPITrendGraph(java.util.List kpis,
                             java.util.Date from,
                             java.util.Date to,
                             java.lang.String range,
                             long mainKPI,
                             WebClientSession clientsession)
        Parameters:
        kpis - List of KPIs to compare
        range - Range type
    • Method Detail

      • getDates

        public java.util.Vector getDates(int datePart,
                                         int points,
                                         java.util.GregorianCalendar g,
                                         int skip)
        Returns a string of labels for dates
        Parameters:
        datePart - the part of date
        points - number of points to be plotted
        skip - number of days to skip
        Returns:
        labels
      • getXIncrement

        public int getXIncrement()
        Adds a number of days, months, years etc based on range of the KPIHistory Sets
        Returns:
        time step as int
      • makeChartData

        public LineChartData makeChartData()
        Returns an object of type Map that will be passed to the jsp for dojo chart image generation
        Returns:
        chart data as Map
      • getColor

        public java.lang.String getColor(int i)
        Returns next available color to draw the chart
        Parameters:
        i - index of color
        Returns:
        HEX value of color as String