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. Python 变量有效范围

  2. 钢管下料问题2(剩余材料最少)lingo求解

    大家好,我是小鸭酱,博客地址为:http://www.cnblogs.com/xiaoyajiang !钢管下料问题2(剩余材料最少) 题目: 钢管原料   每根19m 客户需求   4m   50根 ...

  3. 搭建rac对单实例的MAA

    一:实验环境 系统:redhat 4 三台计算机rac1,rac2,dg. --其中rac为主库,单实例为备库 已在虚拟机里搭建好集群环境(rac1,rac2); dg计算机里还没有建任何数据库(只安 ...

  4. coredump查原因

    1. dmesg |tail -n 1 2. objdump -DCI ./a.out 示例: $ cat a.cpp #include <stdio.h> int main(){ int ...

  5. JDBC开发模式

    一]代码模块———Demo.java public class Demo { private static Connection connection; private static Statemen ...

  6. 函数call相关[ASM]

    前言:   __cdecl:C/C++函数默认调用约定,参数依次从右向左传递,并压入堆栈,最后由调用函数清空堆栈,这种方式适用于传递参数个数可变的被调用函数,只有被调用函数才知道它传递了多少个参数给被 ...

  7. android 无法生成R文件的原因剖析

    android 无法生成R文件 是件痛苦的事情,即使有时候你xml文件没有错误,他都无法生成.针对此问题,我总结以下几个方面的原因. 一.xml本身有错误 R.java这个文件是会自动生成的,但是如果 ...

  8. FROM CSDN TO CNBLOGS

    做出了一个愉快的决定,以后会将博客从CSDN迁移到CNBLOGS 旧地址:http://blog.csdn.net/fifa0329,文章并不多 原因如下: 我再次出现了该博客违反了网站规则被关闭的问 ...

  9. 2014.7.7 模拟赛【小K的农场】

    3.小K的农场(farm.pas/cpp/c) [题目描述] 小K在MC里面建立很多很多的农场,总共n个,以至于他自己都忘记了每个农场中种植作物的具体数量了,他只记得一些含糊的信息(共m个),以下列三 ...

  10. Android:TextView跑马灯-详解

    Android:TextView跑马灯_详解 引言: TextView之所以需要跑马灯,是由于文字太长,或者是吸引眼球. 关键代码如下: android:singleLine="true&q ...