Package com.oorian.echarts
Class ECharts
java.lang.Object
com.oorian.echarts.ECharts
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAllResources(com.oorian.html.elements.Head head) Adds all required ECharts resources to the page head.static voidaddEChartsJavascript(com.oorian.html.elements.Head head) Adds the Apache ECharts JavaScript to the page head.static voidaddOorianEChartsJavascript(com.oorian.html.elements.Head head) Adds the Oorian ECharts bridge JavaScript to the page head.static StringGets the path to the Apache ECharts library JavaScript file.static StringGets the path to the Oorian ECharts bridge JavaScript file.static voidinitialize(com.oorian.html.HtmlPage page) Initializes ECharts for the given page.static voidsetApacheEChartsJs(String apacheEChartsJs) Sets the path to the Apache ECharts library JavaScript file.static voidsetOorianEChartsJs(String oorianEChartsJs) Sets the path to the Oorian ECharts bridge JavaScript file.static voidsetScriptPath(String path) Sets both script paths to the same base path.
-
Constructor Details
-
ECharts
public ECharts()
-
-
Method Details
-
setScriptPath
Sets both script paths to the same base path.- Parameters:
path- the base path for both JavaScript files
-
setOorianEChartsJs
Sets the path to the Oorian ECharts bridge JavaScript file.- Parameters:
oorianEChartsJs- the path to oorian.echarts.js
-
setApacheEChartsJs
Sets the path to the Apache ECharts library JavaScript file.- Parameters:
apacheEChartsJs- the path to echarts.js
-
getOorianEChartsJs
Gets the path to the Oorian ECharts bridge JavaScript file.- Returns:
- the path to oorian.echarts.js
-
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.
-