Class ChartService

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

    public class ChartService
    extends ServiceConfig
    • Constructor Detail

      • ChartService

        @Autowired
        public ChartService​(com.fasterxml.jackson.databind.ObjectMapper mapper,
                            BaseConfigProperties baseConfigProperties)
        Autowired constructor
        Parameters:
        mapper - Object mapper
        baseConfigProperties - Base configuration properties
    • Method Detail

      • renderChart

        public String renderChart​(String screenName,
                                  String chartName,
                                  DataList data)
                           throws AWException
        Render chart with highcharts export server
        Parameters:
        screenName - Screen name where chart is
        chartName - Chart identifier
        data - Data to fill the chart
        Returns:
        SVG image as string
        Throws:
        AWException - Error rendering chart
      • renderChart

        public String renderChart​(String screenName,
                                  String chartName,
                                  Map<String,​DataList> datasourceMap)
                           throws AWException
        Render chart with highcharts export server
        Parameters:
        screenName - Screen name where chart is
        chartName - Chart identifier
        datasourceMap - Data sources map
        Returns:
        SVG image as string
        Throws:
        AWException - Error rendering chart
      • renderChart

        public String renderChart​(Chart chart,
                                  DataList data)
                           throws AWException
        Render chart with highcharts export server
        Parameters:
        chart - Chart
        data - Data to fill the chart
        Returns:
        SVG image as string
        Throws:
        AWException - Error rendering chart
      • renderChart

        public String renderChart​(Chart chart,
                                  Map<String,​DataList> datasourceMap)
                           throws AWException
        Render chart with highcharts export server
        Parameters:
        chart - Chart
        datasourceMap - Data sources map
        Returns:
        SVG image as string
        Throws:
        AWException - Error rendering chart
      • getChart

        public Chart getChart​(String screenName,
                              String chartName)
                       throws AWException
        Retrieve a chart from a screen and a name
        Parameters:
        screenName - Screen name
        chartName - Chart name
        Returns:
        Found chart or null
        Throws:
        AWException