Class XChartUtil


  • public class XChartUtil
    extends java.lang.Object
    Utilities for generating report charts.
    Since:
    14.0.0
    Version:
    $Revision$ $Date$
    • Constructor Detail

      • XChartUtil

        public XChartUtil()
    • Method Detail

      • printLineChart

        public static byte[] printLineChart​(DashboardEmailUtil.Series series,
                                            EventAnalyticsReport report,
                                            ServiceInstanceConfig cxServiceInstance)
                                     throws java.io.IOException,
                                            PortalException
        Returns a PNG image (bytes) for the given line chart.
        Parameters:
        series - the series
        report - the report
        cxServiceInstance - the customer experience service instance
        Returns:
        a PNG image (bytes) for the given line chart.
        Throws:
        java.io.IOException
        PortalException
        Since:
        14.0.0
      • printBarChart

        public static byte[] printBarChart​(DashboardEmailUtil.Series series,
                                           EventAnalyticsReport report,
                                           ServiceInstanceConfig cxServiceInstance)
                                    throws java.io.IOException,
                                           PortalException
        Returns a PNG image (bytes) for the given bar chart.
        Parameters:
        series - the series
        report - the report
        cxServiceInstance - the customer experience service instance
        Returns:
        a PNG image (bytes) for the given bar chart.
        Throws:
        java.io.IOException
        PortalException
        Since:
        14.0.0
      • printPieChart

        public static byte[] printPieChart​(DashboardEmailUtil.Series series,
                                           EventAnalyticsReport report,
                                           boolean isDonut,
                                           ServiceInstanceConfig cxServiceInstance)
                                    throws java.io.IOException,
                                           PortalException
        Returns a PNG image (bytes) for the given chart.
        Parameters:
        series - the series
        report - the report
        isDonut - indicates if the chart is a donut one
        cxServiceInstance - the customer experience service instance
        Returns:
        a PNG image (bytes) for the given chart.
        Throws:
        java.io.IOException
        PortalException
        Since:
        14.0.0
      • renderValue

        public static java.lang.String renderValue​(Metric metric,
                                                   java.lang.Double value)
        Renders the given value
        Parameters:
        metric - the metric
        value - the value
        Returns:
        the rendered value
        Since:
        14.0.0
      • renderPercentage

        public static java.lang.String renderPercentage​(java.lang.Double value)
        Renders the given value
        Parameters:
        value - the value
        Returns:
        the rendered value
        Since:
        14.2.0