Class HeatMapChart
java.lang.Object
org.knowm.xchart.internal.chartpart.Chart<HeatMapStyler, HeatMapSeries>
org.knowm.xchart.HeatMapChart
-
Field Summary
FieldsFields inherited from class Chart
annotations, axisPair, chartTitle, legend, plot, seriesMap, styler -
Constructor Summary
ConstructorsConstructorDescriptionHeatMapChart(int width, int height) Constructor - the default Chart Theme will be used (XChartTheme)HeatMapChart(int width, int height, Styler.ChartTheme chartTheme) ConstructorHeatMapChart(int width, int height, Theme theme) ConstructorHeatMapChart(HeatMapChartBuilder heatMapChartBuilder) Constructor -
Method Summary
Modifier and TypeMethodDescriptionAdd a series for a HeatMap type chart using int arraysAdd a series for a HeatMap type chart using List<?>arrayToList(int[] data) arrayToList(int[][] heatData) voidpaint(Graphics2D g, int width, int height) private voidprivate voidsanityCheck(List<?> xData, List<?> yData, List<Number[]> heatData) updateSeries(String seriesName, int[] xData, int[] yData, int[][] heatData) Update a series by updating the X-Axis, Y-Axis and heat dataUpdate a series by updating the X-Axis, Y-Axis and heat dataMethods inherited from class Chart
addAnnotation, getChartXFromCoordinate, getChartYFromCoordinate, getChartYFromCoordinate, getHeight, getScreenXFromChart, getScreenYFromChart, getScreenYFromChart, getSeriesMap, getStyler, getTitle, getWidth, getXAxisTitle, getYAxisGroupTitle, getYAxisLeftWidth, getYAxisTitle, paintBackground, removeSeries, setCustomXAxisTickLabelsFormatter, setCustomYAxisTickLabelsFormatter, setHeight, setTitle, setWidth, setXAxisTitle, setYAxisGroupTitle, setYAxisTitle
-
Field Details
-
heatMapSeries
-
-
Constructor Details
-
HeatMapChart
public HeatMapChart(int width, int height) Constructor - the default Chart Theme will be used (XChartTheme)- Parameters:
width-height-
-
HeatMapChart
Constructor- Parameters:
width-height-theme- - pass in a instance of Theme class, probably a custom Theme.
-
HeatMapChart
Constructor- Parameters:
width-height-chartTheme- - pass in the desired ChartTheme enum
-
HeatMapChart
Constructor- Parameters:
heatMapChartBuilder-
-
-
Method Details
-
addSeries
Add a series for a HeatMap type chart using int arrays- Parameters:
seriesName-xData- the X-Axis datayData- the Y-Axis dataheatData- the heat data- Returns:
-
addSeries
-
updateSeries
Update a series by updating the X-Axis, Y-Axis and heat data- Parameters:
seriesName-xData-yData-heatData- heat data value, {{1,5,3,7,...},{8,4,5,8,...},{1,9,12,15,...},...}- Returns:
-
updateSeries
public HeatMapSeries updateSeries(String seriesName, List<?> xData, List<?> yData, List<Number[]> heatData) Update a series by updating the X-Axis, Y-Axis and heat data- Parameters:
seriesName-xData-yData-heatData- heat data, {[0,0,1],[0,1,3],[0,2,2],[0,3,18],[1,0,26],[1,1,6],[1,2,7],...}- Returns:
-
getHeatMapSeries
-
paint
- Specified by:
paintin classChart<HeatMapStyler, HeatMapSeries>
-
arrayToList
-
arrayToList
-
sanityCheck
-
prepareForPaint
private void prepareForPaint()
-