Jasper Create a new stacked chart

Source: Internet
Author: User

How to make a stacked Chart1, prepare data Source

Here we'll create a CSV file.

2, import/configuring a data source

(1) Open Eclipse Repository Explorer

Window->show view->other-> Repository Explorer->ok

(2) CSV file, data adapters, create data adapters

Name--char_stacked. (Your chart name)

FILE-Choose your local stacked.csv file.

Click button, Get column names from the first row of the file

Choose, use Query Executor mode (the report must use the CSV query language)

Choose, Skip the first line (the column names would be read from the first line)

Click button, Finish

3, create a Jasper file.

   

 

4, make stacked chart.

(1) Only keep Summary band, delete other band (Title, Page header, column header, Detail 1, column Footer, Page Footer) .

(2) Drag chart from Palette to Summary.

Choose-Stacked Bar, Next.

(3) Chart Data Configuration.

Series:

5, solutions of some problems:

(1) Document is Empty.

We already configuration The CSV data and use it, CSV file also has data, but error is document is Empty, this maybe did Not configuring the language.

(2) Cast problem.

This mostly caused by Field class Config error, we can change the field class style from string to double, float and so on .

(3) Unable to get the value for CSV field.

This problem, we can check the data config again, sometimes our first time configuration has no effect. Need to check again.

Now, click on Preview, we can see the stacked chart.

How to change bar color?

We can use Chart Plot-Series Colors. ADD the color which we want to change.

How to change Legend position?

How to add a chart title?

Preview

Jasper Create a new stacked chart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.