jasper create a new stacked chart

來源:互聯網
上載者:User

標籤:

How to make a stacked chart1, prepare data Source

here we will create a csv file.

2, import/configuring a data source

(1)    open eclipse Repository Explorer

Window->Show View->Other-> Repository Explorer->OK

 

(2)    Data Adapters -> create Data Adapters  -> CSV file

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 will 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 have 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 value for CSV field.

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

   

Now, click 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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.