Class ECharts

java.lang.Object
com.oorian.echarts.ECharts

public class ECharts extends Object
Entry point class for the ECharts wrapper library.

Provides static methods to configure JavaScript resource paths for the ECharts library. These paths are used when rendering charts to include the necessary JavaScript files.

Example usage:


 // Configure paths for your application
 ECharts.setApacheEChartsJs("/js/echarts/echarts.min.js");
 ECharts.setOorianEChartsJs("/js/echarts/oorian.echarts.js");
 
Author:
Oorian
  • Constructor Details

    • ECharts

      public ECharts()
  • Method Details

    • setScriptPath

      public static void setScriptPath(String path)
      Sets both script paths to the same base path.
      Parameters:
      path - the base path for both JavaScript files
    • setOorianEChartsJs

      public static void setOorianEChartsJs(String oorianEChartsJs)
      Sets the path to the Oorian ECharts bridge JavaScript file.
      Parameters:
      oorianEChartsJs - the path to oorian.echarts.js
    • setApacheEChartsJs

      public static void setApacheEChartsJs(String apacheEChartsJs)
      Sets the path to the Apache ECharts library JavaScript file.
      Parameters:
      apacheEChartsJs - the path to echarts.js
    • getOorianEChartsJs

      public static String getOorianEChartsJs()
      Gets the path to the Oorian ECharts bridge JavaScript file.
      Returns:
      the path to oorian.echarts.js
    • getApacheEChartsJs

      public static String getApacheEChartsJs()
      Gets the path to the Apache ECharts library JavaScript file.
      Returns:
      the path to echarts.js
    • addEChartsJavascript

      public static void addEChartsJavascript(com.oorian.html.elements.Head head)
      Adds the Apache ECharts JavaScript to the page head.
      Parameters:
      head - The page head element.
    • addOorianEChartsJavascript

      public static void addOorianEChartsJavascript(com.oorian.html.elements.Head head)
      Adds the Oorian ECharts bridge JavaScript to the page head.
      Parameters:
      head - The page head element.
    • addAllResources

      public static void addAllResources(com.oorian.html.elements.Head head)
      Adds all required ECharts resources to the page head.
      Parameters:
      head - The page head element.
    • initialize

      public static void initialize(com.oorian.html.HtmlPage page)
      Initializes ECharts for the given page. Adds all required JavaScript resources to the page head.
      Parameters:
      page - The page to initialize ECharts on.