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. Lintcode--010(最长上升子序列)

    给定一个整数序列,找到最长上升子序列(LIS),返回LIS的长度.LIS(longestIncreasingSubsequence) 说明: 最长上升子序列的定义: 最长上升子序列问题是在一个无序的给 ...

  2. 【转】const的用法,特别是用在函数前面与后面的区别!

    在普通的非 const成员函数中,this的类型是一个指向类类型的 const指针.可以改变this所指向的值,但不能改变 this所保存的地址. 在 const成员函数中,this的类型是一个指向 ...

  3. cf C. Prime Number

    http://codeforces.com/contest/359/problem/C 先求出分子的公因子,然后根据分子上会除以公因子会长生1,然后记录1的个数就可以. #include <cs ...

  4. HDU 4116 Fruit Ninja

    http://acm.hdu.edu.cn/showproblem.php?pid=4116 题意:给N个圆,求一条直线最多能经过几个圆?(相切也算) 思路:枚举中心圆,将其他圆的切线按照极角排序,并 ...

  5. [置顶] tar命令-linux

    tar命令 先对文件进行打包,然后进行压缩. [.tar..gz..tar.gz..tgz..bz2..tar.bz2..Z..tar.Z..zip..rar] [主要讲tar,其他还有zip/unz ...

  6. ext3中xtype属性汇总

    基本组件: xtype Class 描述 button Ext.Button 按钮 splitbutton Ext.SplitButton 带下拉菜单的按钮 cycle Ext.CycleButton ...

  7. PHP数据结构:栈、队列、堆、固定数组

    数据结构:栈 队列: 堆: 固定尺寸的数组:

  8. Windows系统基本概念

    windows API:被文档化的可以调用的子例程,如CreateProcess 原生的系统服务(执行体系统服务):未被文档化的.可以再用户模式下调用的底层服务,如NtCreateProcess 内核 ...

  9. 获取某个文件夹中所有txt文件

    <?php // 获取文件夹中的所有txt文件名 $dir = "D:/a"; //这里输入其他路径 $handle = opendir($dir."." ...

  10. Python安装MySQLdb并连接MySQL数据库

    当然了,前提是你已经安装了Python和MySQL.我的Python是2.6版本的. Python2.6的“Set”有点兼容性问题,自己照着改一下: http://sourceforge.net/fo ...