Package jslx.charts
Class JSLChartUtil
- java.lang.Object
-
- jslx.charts.JSLChartUtil
-
public class JSLChartUtil extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_FIGURE_FILE_NAME
static org.slf4j.Logger
LOGGER
-
Constructor Summary
Constructors Constructor Description JSLChartUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static tech.tablesaw.plotly.components.Figure
makePartialSumsPlotFigure(java.lang.String dataName, double[] partialSums)
Warning: This method uses plotly.static tech.tablesaw.plotly.components.Figure
makeWelchPlotFigure(java.lang.String title, java.lang.String dataName, double[] avg, double[] cumAvg)
Warning: This method uses plotly.static tech.tablesaw.plotly.components.Figure
makeWelchPlotFigure(WelchDataArrayObserver dataArrayObserver)
Warning: This method uses plotly.static tech.tablesaw.plotly.components.Figure
makeWelchPlotFigure(WelchDataFileAnalyzer analyzer)
Warning: This method uses plotly.static tech.tablesaw.plotly.components.Figure
makeWelchPlotFigure(WelchDataFileAnalyzer analyzer, int totalNumObservations)
Warning: This method uses plotly.static boolean
showPlot(tech.tablesaw.plotly.components.Figure figureToPlot)
Shows the plot in a web page and makes an html file of the plot.static boolean
showPlot(tech.tablesaw.plotly.components.Figure figureToPlot, java.lang.String nameOfFigureFile)
Shows the plot in a web page and makes an html file of the plot.static void
showPlot(tech.tablesaw.plotly.components.Figure figureToPlot, java.nio.file.Path pathToSaveFigure)
Shows the plot in a web page and makes an html file of the plot.static boolean
showPlotNE(tech.tablesaw.plotly.components.Figure figureToPlot, java.nio.file.Path pathToSaveFigure)
Shows the plot in a web page and makes an html file of the plot.
-
-
-
Field Detail
-
LOGGER
public static final org.slf4j.Logger LOGGER
-
DEFAULT_FIGURE_FILE_NAME
public static final java.lang.String DEFAULT_FIGURE_FILE_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
showPlot
public static boolean showPlot(tech.tablesaw.plotly.components.Figure figureToPlot)
Shows the plot in a web page and makes an html file of the plot. Squelches inconvenient FileIO exceptions The plot file is named DefaultFigure_ + yyyy_MM_dd_HH_mm_ss- Parameters:
figureToPlot
- the constructed figure to plot- Returns:
- false if there was a problem/error
-
showPlot
public static boolean showPlot(tech.tablesaw.plotly.components.Figure figureToPlot, java.lang.String nameOfFigureFile)
Shows the plot in a web page and makes an html file of the plot. Squelches inconvenient FileIO exceptions- Parameters:
figureToPlot
- the constructed figure to plotnameOfFigureFile
- the name of the file in the jslOutput/plotDir to hold the plot- Returns:
- false if there was a problem/error
-
showPlotNE
public static boolean showPlotNE(tech.tablesaw.plotly.components.Figure figureToPlot, java.nio.file.Path pathToSaveFigure)
Shows the plot in a web page and makes an html file of the plot. Squelches inconvenient FileIO exceptions- Parameters:
figureToPlot
- the constructed figure to plotpathToSaveFigure
- the path to the file that will hold the html for the plot- Returns:
- false if there was a problem/error
-
showPlot
public static void showPlot(tech.tablesaw.plotly.components.Figure figureToPlot, java.nio.file.Path pathToSaveFigure) throws java.io.IOException
Shows the plot in a web page and makes an html file of the plot.- Parameters:
figureToPlot
- the constructed figure to plotpathToSaveFigure
- the path to the file that will hold the html for the plot- Throws:
java.io.IOException
- if a problem with the temp files occurs
-
makePartialSumsPlotFigure
public static tech.tablesaw.plotly.components.Figure makePartialSumsPlotFigure(java.lang.String dataName, double[] partialSums)
Warning: This method uses plotly. If there are too many data points then it may not work. Stick with less than 50K points- Parameters:
dataName
- the name of the responsepartialSums
- the partial sums to plot- Returns:
- the figure
-
makeWelchPlotFigure
public static tech.tablesaw.plotly.components.Figure makeWelchPlotFigure(WelchDataFileAnalyzer analyzer)
Warning: This method uses plotly. If there are too many data points then it may not work. This will only permit less than 50K points- Parameters:
analyzer
- the WelchDataFileAnalyzer that has the Welch data to display- Returns:
- the figure
-
makeWelchPlotFigure
public static tech.tablesaw.plotly.components.Figure makeWelchPlotFigure(WelchDataFileAnalyzer analyzer, int totalNumObservations)
Warning: This method uses plotly. If there are too many data points then it may not work. This will only permit less than 50K points- Parameters:
analyzer
- the WelchDataFileAnalyzer that has the Welch data to displaytotalNumObservations
- the number of observations to plot- Returns:
- the figure
-
makeWelchPlotFigure
public static tech.tablesaw.plotly.components.Figure makeWelchPlotFigure(WelchDataArrayObserver dataArrayObserver)
Warning: This method uses plotly. If there are too many data points then it may not work. Stick with less than 50K points- Parameters:
dataArrayObserver
- the WelchDataArrayObserver that has the Welch data to display- Returns:
- the figure
-
makeWelchPlotFigure
public static tech.tablesaw.plotly.components.Figure makeWelchPlotFigure(java.lang.String title, java.lang.String dataName, double[] avg, double[] cumAvg)
Warning: This method uses plotly. If there are too many data points then it may not work. Stick with less than 50K points- Parameters:
title
- the title of the chartdataName
- the name of the responseavg
- the Welch averagescumAvg
- the cumulative averages- Returns:
- the figure
-
-