Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Chart Post-Processing Script

  1. #1

    Default Chart Post-Processing Script

    I am using a regular Bar Chart in PRD. I have way too many labels on my XAxis, which makes it unreadable. Im playing with post-processing formulas.

    there are a couple that I CAN get to work. For instance:

    • chart.getPlot().domainAxis.setTickLabelsVisible(false);
    • chart.getPlot().domainAxis.setTickLabelFont(new Font("Arial",Font.BOLD,12));


    However, I can not get the one that i NEED to work to actually work. And that is:
    • chart.getPlot().getDomainAxis().setTickUnit(new DateTickUnit(DateTickUnit.DAY, 7));



    does anyone know what I am doing wrong with setTickUnit??

    thx

  2. #2
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    If you use a categorical chart, then the values on the x-axis have no sort order, as categorical data uses a nominal scale. You need to use a XY-Bar-Chart if you want to have a interval-scale.

    Read: http://www.sherito.org/2011/07/chart...ts-and-xy.html to learn the difference

    Once you use a XY-BarChart with date-values as domain-values, your domain axis will be a "org.jfree.chart.axis.DateAxis" and you will be able to call the method "setTickUnit".
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3

    Default

    great response! Thanks Taqua! I will check it out...

  4. #4
    Join Date
    Nov 2011
    Posts
    20

    Default

    Hi,

    I was actually looking at doing the same thing since I have a lot of values on the x-axis and it becomes unreadable. Is the post processing formula you are talking about present when you define a parameter?

    Please can you let me know where exactly in the report can I find it and what do I need to change to customize the x-axis labels.

    Thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.