I.Overview
When the amount of data is very large and reaches 10,000 levels, the chart loading will be slower and the display effect will not be good, as shown in the following figure, taking a line chart as an example:
FineReport provides a big data optimization function, which can optimize the effect of the chart and speed up the display of the chart when the amount of data is large. The effect is shown in the figure:
II.Example
1. Data preparation
Create a New General Report, create a new dataset ds1, the SQL statement is: SELECT * FROM bigdata
2. Insert chart
Merge a range of cells, insert cell A1 into a line chart, as shown in the figure below:
3. Binding data
Select Data in the chart properties panel, select the data set ds1 for the data source, select the number for the category, and use the FieldName for the series name, as shown in the following figure:
4. Setting the style
1) Set Series
Follow the steps in the figure below to set the color scheme and line of the series, and turn on the Large Data Volume Mode; the example uses a custom combination of colors, which can be adjusted by yourself.
2) Set Axis
Set the X Axis, customize the maximum value and main scale unit as shown in the steps below:
5. Effect preview
Save the report, click Pagination Preview, the chart display effect is as shown in the figure below:
Note: When the coordinate axis is a category axis, the sort order will be changed; when the coordinate axis is a time axis or a value axis, the front-end display effect will not be affected.
III. Template download
The completed template can be found in:%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Chart\LineChart\bigdata_line_chart.cpt
Click to download the template: