Package com.oorian.apexcharts
Class ApexCharts
java.lang.Object
com.oorian.apexcharts.ApexCharts
Entry point for the ApexCharts wrapper library.
Provides static methods to configure resource paths and add JS/CSS to pages.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAllResources(com.oorian.html.elements.Head head) Adds all required ApexCharts resources to the page head.static voidaddApexChartsJavascript(com.oorian.html.elements.Head head) Adds the ApexCharts JavaScript to the page head.static voidaddOorianApexChartsJavascript(com.oorian.html.elements.Head head) Adds the Oorian ApexCharts JavaScript to the page head.static StringGets the URL for the ApexCharts JavaScript file.static StringGets the URL for the Oorian ApexCharts JavaScript file.static voidinitialize(com.oorian.html.HtmlPage page) Initializes ApexCharts for the given page.static voidsetApexChartsRootPath(String path) Sets the root path for ApexCharts resources.static voidSets the path to the Oorian ApexCharts JavaScript file.static voidsetUseCdn(boolean useCdn) Sets whether to use CDN resources or local files.
-
Constructor Details
-
ApexCharts
public ApexCharts()
-
-
Method Details
-
setOorianApexChartsJsPath
Sets the path to the Oorian ApexCharts JavaScript file.- Parameters:
path- The path to the JavaScript file.
-
setApexChartsRootPath
Sets the root path for ApexCharts resources.- Parameters:
path- The root path.
-
setUseCdn
public static void setUseCdn(boolean useCdn) Sets whether to use CDN resources or local files.- Parameters:
useCdn- True to use CDN, false to use local files.
-
getOorianApexChartsJs
Gets the URL for the Oorian ApexCharts JavaScript file.- Returns:
- The JavaScript URL.
-
getApexChartsJs
Gets the URL for the ApexCharts JavaScript file.- Returns:
- The JavaScript URL.
-
addApexChartsJavascript
public static void addApexChartsJavascript(com.oorian.html.elements.Head head) Adds the ApexCharts JavaScript to the page head.- Parameters:
head- The page head element.
-
addOorianApexChartsJavascript
public static void addOorianApexChartsJavascript(com.oorian.html.elements.Head head) Adds the Oorian ApexCharts 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 ApexCharts resources to the page head.- Parameters:
head- The page head element.
-
initialize
public static void initialize(com.oorian.html.HtmlPage page) Initializes ApexCharts for the given page. Adds all required JavaScript resources to the page head and the initialization script to the body. This method is safe to call multiple times; the init script will only be added once.- Parameters:
page- The page to initialize ApexCharts on.
-