chart.getStyleManager().setDatePattern(pattern); chart.getStyleManager().setAxisTickLabelsFont(chartTheme.getAxisTickLabelsFont(dpi)); chart.getStyleManager().setAxisTickLabelsColor(chartTheme.getAxisTickLabelsColor()); chart.getStyleManager().setXAxisMin(startTime.getTime()); chart.getStyleManager().setXAxisMax(endTime.getTime()); int yAxisSpacing = Math.max(height / 10, chartTheme.getAxisTickLabelsFont(dpi).getSize()); chart.getStyleManager().setYAxisTickMarkSpacingHint(yAxisSpacing); chart.getStyleManager().setChartBackgroundColor(chartTheme.getChartBackgroundColor()); chart.getStyleManager().setChartFontColor(chartTheme.getChartFontColor()); chart.getStyleManager().setChartPadding(chartTheme.getChartPadding(dpi)); chart.getStyleManager().setPlotBackgroundColor(chartTheme.getPlotBackgroundColor()); float plotGridLinesDash = (float) chartTheme.getPlotGridLinesDash(dpi); float[] plotGridLinesDashArray = { plotGridLinesDash, plotGridLinesDash }; chart.getStyleManager().setPlotGridLinesStroke( new BasicStroke((float) chartTheme.getPlotGridLinesWidth(dpi), 0, 2, 10, plotGridLinesDashArray, 0)); chart.getStyleManager().setPlotGridLinesColor(chartTheme.getPlotGridLinesColor()); chart.getStyleManager().setLegendBackgroundColor(chartTheme.getLegendBackgroundColor()); chart.getStyleManager().setLegendFont(chartTheme.getLegendFont(dpi)); chart.getStyleManager().setLegendSeriesLineLength(chartTheme.getLegendSeriesLineLength(dpi)); Series series = chart.addSeries("NONE", xData, yData); series.setMarker(SeriesMarker.NONE); series.setLineStyle(new BasicStroke(0f)); chart.getStyleManager().setLegendPosition(LegendPosition.InsideNW); } else {
Series series = chart.addSeries(label, xData, yData); float lineWidth = (float) chartTheme.getLineWidth(dpi); series.setLineStyle(new BasicStroke(lineWidth, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER));
Series series = chart.addSeries(label, xData, yData); float lineWidth = (float) chartTheme.getLineWidth(dpi); series.setLineStyle(new BasicStroke(lineWidth, BasicStroke.CAP_ROUND, BasicStroke.JOIN_MITER));
chart.getStyleManager().setDatePattern(pattern); chart.getStyleManager().setAxisTickLabelsFont(chartTheme.getAxisTickLabelsFont(dpi)); chart.getStyleManager().setAxisTickLabelsColor(chartTheme.getAxisTickLabelsColor()); chart.getStyleManager().setXAxisMin(startTime.getTime()); chart.getStyleManager().setXAxisMax(endTime.getTime()); int yAxisSpacing = Math.max(height / 10, chartTheme.getAxisTickLabelsFont(dpi).getSize()); chart.getStyleManager().setYAxisTickMarkSpacingHint(yAxisSpacing); chart.getStyleManager().setChartBackgroundColor(chartTheme.getChartBackgroundColor()); chart.getStyleManager().setChartFontColor(chartTheme.getChartFontColor()); chart.getStyleManager().setChartPadding(chartTheme.getChartPadding(dpi)); chart.getStyleManager().setPlotBackgroundColor(chartTheme.getPlotBackgroundColor()); float plotGridLinesDash = (float) chartTheme.getPlotGridLinesDash(dpi); float[] plotGridLinesDashArray = { plotGridLinesDash, plotGridLinesDash }; chart.getStyleManager().setPlotGridLinesStroke( new BasicStroke((float) chartTheme.getPlotGridLinesWidth(dpi), 0, 2, 10, plotGridLinesDashArray, 0)); chart.getStyleManager().setPlotGridLinesColor(chartTheme.getPlotGridLinesColor()); chart.getStyleManager().setLegendBackgroundColor(chartTheme.getLegendBackgroundColor()); chart.getStyleManager().setLegendFont(chartTheme.getLegendFont(dpi)); chart.getStyleManager().setLegendSeriesLineLength(chartTheme.getLegendSeriesLineLength(dpi)); Series series = chart.addSeries("NONE", xData, yData); series.setMarker(SeriesMarker.NONE); series.setLineStyle(new BasicStroke(0f)); chart.getStyleManager().setLegendPosition(LegendPosition.InsideNW); } else {