How to make a stacked chart

1, 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_chart_create a new stacked chart的更多相关文章

  1. flex stacked column graph

    Flex: Stacked column chart – programmatically in actionscript By bishopondevelopment I was looking f ...

  2. [转] Symbol对象

    GIS中的离散实体有三种:点.线.面,在ArcEngine中用三种符号对应表示,分别是:MarkSymbol.LineSymbol和FillSymbol.此外还有TextSymbol用于文字标注,3D ...

  3. A Complete Tutorial to Learn Data Science with Python from Scratch

    A Complete Tutorial to Learn Data Science with Python from Scratch Introduction It happened few year ...

  4. d3js shape深入理解

    本文将视图了解d3js提供的帮助我们创建矢量图形的helper函数,比如下面的: http://d3indepth.com/shapes/ lines curves pie chart segment ...

  5. Python第三方库之openpyxl(4)

    Python第三方库之openpyxl(4) 2D柱状图 在柱状图中,值被绘制成水平条或竖列. 垂直.水平和堆叠柱状图. 注意:以下设置影响不同的图表类型 1.在垂直和水平条形图之间切换,分别设置为c ...

  6. Python3 读取和写入excel

    https://blog.csdn.net/weixin_43094965/article/details/82226263一.Excel 1.Excel文件三个对象 workbook: 工作簿,一个 ...

  7. OCR文字识别笔记总结

    OCR的全称是Optical Character Recognition,光学字符识别技术.目前应用于各个领域方向,甚至这些应用就在我们的身边,比如身份证的识别,交通路牌的识别,车牌的自动识别等等.本 ...

  8. Python openpyxl Excel绘制柱形图

    这是一份openpyxl的使用指南. 大体内容翻译自官网 https://openpyxl.readthedocs.io/en/stable/charts/bar.html#vertical-hori ...

  9. Python办公自动化之Excel做表自动化:全网最全,看这一篇就够了!

    文章目录 很多人学习python,不知道从何学起.很多人学习python,掌握了基本语法过后,不知道在哪里寻找案例上手.很多已经做案例的人,却不知道如何去学习更加高深的知识.那么针对这三类人,我给大家 ...

随机推荐

  1. Windows server 2012 各版本 激活方法

    Windows server 2012 激活教程 本文包括以下两种版本的激活过程:(注意RC版的是不能激活的!) 1.Windows server 2012 试用版本激活 2.Windows serv ...

  2. Scala学习文档-访问修饰符

    在scala里,对保护成员的访问比Java严格.Scala中,保护成员只在定义了成员的类的子类中可以访问,而Java中,还允许在同一个包的其他类中访问. package p1 { class FCla ...

  3. new Handler()和new Handler(Looper.getMainLooper())的区别

    一个帖子的整理: Handler一定要在主线程实例化吗?new Handler()和new Handler(Looper.getMainLooper())的区别如果你不带参数的实例化:Handler ...

  4. 一个oracle存储过程

    打开plsql,在packages文件夹里新建存储过程 在sql窗口中运行如下语句 create or replace package SY_USER_PKG1 is TYPE MYCURSOR IS ...

  5. linux下查看和设置软件的安装路径

    1:你可以通过whereis 软件名来查找系统里的文件位置 比如你想查找eclipse文件,那么就: [root@localhost ~]# whereis eclipse 会显示: eclipse: ...

  6. Delphi keydown与keyup、keypress的区别(KeyDown 和KeyUp 通常可以捕获键盘除了PrScrn所有按键)

    Shift 是一个集合变量.type TShiftState = set of (ssShift, ssAlt, ssCtrl, ssLeft, ssRight, ssMiddle, ssDouble ...

  7. Manage Spring Boot Logs with Elasticsearch, Logstash and Kibana

    下载地址:https://www.elastic.co/downloads When time comes to deploy a new project, one often overlooked ...

  8. 开机启动tomcat

    windows: 成功之后在dos窗口键入 service.bat install Tomcat 输完然后按Enter键,出现如下窗口,便成功了. 进入windows服务管理,设成是自动的. #chk ...

  9. Abstract Methods and Classes

    阅读了Java的官方Doc,在此总结如下. Abstract Class & Method In jave, "abstract" can be a modifier to ...

  10. html p标签换行问题

    /*p标签自动换行*/ p{ word-wrap:break-word; word-break:normal; } /*p强制不换行*/ p{ white-space:nowrap; } /*块级元素 ...