際際滷

際際滷Share a Scribd company logo
Bar charts with iText Guy Geens < [email_address] > http://www.iggyland.com/ http://kanonnenpoetser.blogspot.com/ Barcamp Gent 2008
Case: Work Balance Board Yamazumi (Japanese: to stack up) = Stacked bar chart Each stack represents a specific workload on a workstation Used to compare and optimize a production process
Example
Each bar consists of a series of tasks (Balance cards) Each task contains one or more of Legend TF1: Useful tasks TF2: Overhead Auto: Time using machines Walk: Time spend moving/bending (ergonomy)
Cycle time = Time available for a single car Determined by line speed Overshoot may lead to line stops Balancing: Distributing tasks between workstations
Restrictions Up to 10 bars per page Users print the report and add notes The list of balance cards for a single variant is available on a separate report (Operator Instruction Sheet)
Why iText? The report is called from a web application Exact layout is difficult in HTML There is no way to specify Print in Landscape mode from the server. In iText, this is achieved by:  Document doc = new Document(PageSize.A4.rotate());
Positioning the graph Determine left and right edges Divide by the number of bars Determine top and bottom coordinates Offsets are determined by header  and footer height left = page.left(50); right = page.right(10); x[i] = left + i * (right  left) / n; top = page.top(100); bottom = page.bottom(100);
Scaling the graph Find the total TMU for each bar Determine the maximum time for all bars + Cycle Time Scale = (y1  y0) / max
Drawing the bar For each balance card: Draw each element in the order: TF1, TF2, Auto, Walk Height = time * scale Draw a rectangle with this height and advance the start position Add a marker with the total workload Finally, draw a line for the cycle time
Code Drawing a rectangle: cb.setColorFill(PdfGraphHelper.tf1Color); cb.rectangle(x, y, width, height); cb.fill(); y += height;
Minus times Balance card 1: Take screwdriver Fasten screw A Balance card 2: Take screwdriver Fasten screw B Combined: Take screwdriver Fasten screw A Fasten screw B Balance cards remain unchanged A correction is applied to the total time When balance cards are separated, the correction is removed
Example Negative values are plotted in a second bar Bars are aligned at the top Data is shown from bottom to top
Changes to flow When calculating the scale, only use positive values Gives the height of the main bar Calculate the total of the negative values This is the height of the second bar Positive values go to the main bar, negative values to the secondary bar (absolute values) Workload marker shows the grand total (pos + neg)
Conclusion iText provides enough detail to show even the smallest bars (size ~10  total size ~2000) Online documentation lacks some information (e.g., coordinate units). There seems to be no way to obtain the position of text elements/tables (for aligning with graphics)
Thank you for your time Questions?

More Related Content

Similar to Barcamp Gent2008 (19)

DOCX
PHYS 221Lab 1 - Acceleration Due to GravityPlease work in g.docx
mattjtoni51554
PDF
Risa education tut
Argenis Colmenares
DOCX
Excel Training
James Ramsey
PPS
Case Study for Plant Layout :: A modern analysis
Sarang Bhutada
PPTX
Power Systems Fundamentals - EE3500 - Lab 1.pptx
engrodriguesyuri
PPTX
Electrical Engineering Exam Help
Live Exam Helper
PDF
write the code for Part 1 ContextFree Grammars Create con.pdf
aaryanentp
PPS
C programming session 02
Dushmanta Nath
DOCX
#include iostream#includectimeusing namespace std;void.docx
mayank272369
PDF
Sap arch
Taqi Zaidi
PDF
AUTOCAD RAHUL
RahulKumar5178
DOCX
Excel Project 1 MS Excel (Summer 2019) Use the foll.docx
cravennichole326
RTF
Amortized complexity
paramita30
DOCX
MemorandumDesign4Practice (D4P) ProgramTo EGR 186 Students.docx
andreecapon
PDF
DMAP Tutorial
Sohrab Kolsoumi
DOCX
The Pennsylvania State University Department of Civi.docx
ssusera34210
PPT
Mapreduce: Theory and implementation
Sri Prasanna
DOCX
Practical work 5
wkhairil80
PHYS 221Lab 1 - Acceleration Due to GravityPlease work in g.docx
mattjtoni51554
Risa education tut
Argenis Colmenares
Excel Training
James Ramsey
Case Study for Plant Layout :: A modern analysis
Sarang Bhutada
Power Systems Fundamentals - EE3500 - Lab 1.pptx
engrodriguesyuri
Electrical Engineering Exam Help
Live Exam Helper
write the code for Part 1 ContextFree Grammars Create con.pdf
aaryanentp
C programming session 02
Dushmanta Nath
#include iostream#includectimeusing namespace std;void.docx
mayank272369
Sap arch
Taqi Zaidi
AUTOCAD RAHUL
RahulKumar5178
Excel Project 1 MS Excel (Summer 2019) Use the foll.docx
cravennichole326
Amortized complexity
paramita30
MemorandumDesign4Practice (D4P) ProgramTo EGR 186 Students.docx
andreecapon
DMAP Tutorial
Sohrab Kolsoumi
The Pennsylvania State University Department of Civi.docx
ssusera34210
Mapreduce: Theory and implementation
Sri Prasanna
Practical work 5
wkhairil80

Recently uploaded (20)

PPSX
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
PDF
Scaling i.MX Applications Processors Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
PPTX
Practical Applications of AI in Local Government
OnBoard
PPTX
Smart Factory Monitoring IIoT in Machine and Production Operations.pptx
Rejig Digital
PDF
How to Comply With Saudi Arabias National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
PPTX
The birth and death of Stars - earth and life science
rizellemarieastrolo
PDF
Understanding AI Optimization AIO, LLMO, and GEO
CoDigital
PDF
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
PDF
Next level data operations using Power Automate magic
Andries den Haan
PDF
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
PDF
Pipeline Industry IoT - Real Time Data Monitoring
Safe Software
PDF
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
PDF
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
PDF
Kubernetes - Architecture & Components.pdf
geethak285
PDF
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
PDF
The Future of Product Management in AI ERA.pdf
Alyona Owens
Usergroup - OutSystems Architecture.ppsx
Kurt Vandevelde
Scaling i.MX Applications Processors Native Edge AI with Discrete AI Accele...
Edge AI and Vision Alliance
Practical Applications of AI in Local Government
OnBoard
Smart Factory Monitoring IIoT in Machine and Production Operations.pptx
Rejig Digital
How to Comply With Saudi Arabias National Cybersecurity Regulations.pdf
Bluechip Advanced Technologies
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
The birth and death of Stars - earth and life science
rizellemarieastrolo
Understanding AI Optimization AIO, LLMO, and GEO
CoDigital
LLM Search Readiness Audit - Dentsu x SEO Square - June 2025.pdf
Nick Samuel
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
Next level data operations using Power Automate magic
Andries den Haan
Bridging CAD, IBM TRIRIGA & GIS with FME: The Portland Public Schools Case
Safe Software
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
Pipeline Industry IoT - Real Time Data Monitoring
Safe Software
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
Kubernetes - Architecture & Components.pdf
geethak285
Optimizing the trajectory of a wheel loader working in short loading cycles
Reno Filla
The Future of Product Management in AI ERA.pdf
Alyona Owens
Ad

Barcamp Gent2008

  • 1. Bar charts with iText Guy Geens < [email_address] > http://www.iggyland.com/ http://kanonnenpoetser.blogspot.com/ Barcamp Gent 2008
  • 2. Case: Work Balance Board Yamazumi (Japanese: to stack up) = Stacked bar chart Each stack represents a specific workload on a workstation Used to compare and optimize a production process
  • 4. Each bar consists of a series of tasks (Balance cards) Each task contains one or more of Legend TF1: Useful tasks TF2: Overhead Auto: Time using machines Walk: Time spend moving/bending (ergonomy)
  • 5. Cycle time = Time available for a single car Determined by line speed Overshoot may lead to line stops Balancing: Distributing tasks between workstations
  • 6. Restrictions Up to 10 bars per page Users print the report and add notes The list of balance cards for a single variant is available on a separate report (Operator Instruction Sheet)
  • 7. Why iText? The report is called from a web application Exact layout is difficult in HTML There is no way to specify Print in Landscape mode from the server. In iText, this is achieved by: Document doc = new Document(PageSize.A4.rotate());
  • 8. Positioning the graph Determine left and right edges Divide by the number of bars Determine top and bottom coordinates Offsets are determined by header and footer height left = page.left(50); right = page.right(10); x[i] = left + i * (right left) / n; top = page.top(100); bottom = page.bottom(100);
  • 9. Scaling the graph Find the total TMU for each bar Determine the maximum time for all bars + Cycle Time Scale = (y1 y0) / max
  • 10. Drawing the bar For each balance card: Draw each element in the order: TF1, TF2, Auto, Walk Height = time * scale Draw a rectangle with this height and advance the start position Add a marker with the total workload Finally, draw a line for the cycle time
  • 11. Code Drawing a rectangle: cb.setColorFill(PdfGraphHelper.tf1Color); cb.rectangle(x, y, width, height); cb.fill(); y += height;
  • 12. Minus times Balance card 1: Take screwdriver Fasten screw A Balance card 2: Take screwdriver Fasten screw B Combined: Take screwdriver Fasten screw A Fasten screw B Balance cards remain unchanged A correction is applied to the total time When balance cards are separated, the correction is removed
  • 13. Example Negative values are plotted in a second bar Bars are aligned at the top Data is shown from bottom to top
  • 14. Changes to flow When calculating the scale, only use positive values Gives the height of the main bar Calculate the total of the negative values This is the height of the second bar Positive values go to the main bar, negative values to the secondary bar (absolute values) Workload marker shows the grand total (pos + neg)
  • 15. Conclusion iText provides enough detail to show even the smallest bars (size ~10 total size ~2000) Online documentation lacks some information (e.g., coordinate units). There seems to be no way to obtain the position of text elements/tables (for aligning with graphics)
  • 16. Thank you for your time Questions?