Class ChartService

java.lang.Object
com.almis.awe.config.ServiceConfig
com.almis.awe.service.ChartService
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware

public class ChartService extends ServiceConfig
  • Constructor Details

    • ChartService

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

    • 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