Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Bar Charts woes ...

  1. #1
    Join Date
    Jun 2007
    Posts
    16

    Default Bar Charts woes ...

    Hi,

    I am working with some bar chars for my reports, and not stuck! let me explain.
    This is the first graph I created. If you notice, the domain-label is not exactly in the center of the bar, it's near the top. This is confusing especially when the bars are close together and small. Is it possible to bring the domain-label to the middle of the bar?

    2. Is it possible to print the data value just above the bar?



    This is the action-definition I am using for the above graph.
    <action-definition>
    <component-name>ChartComponent</component-name>
    <action-type>Create The Chart</action-type>
    <action-inputs>
    <output-type type="string" mapping="chart-type"/>
    <chart-data type="result-set" mapping="chartData"/>
    </action-inputs>
    <action-outputs>
    <chart-filename type="string"/>
    <chart-map-html type="string"/>
    <base-url type="string"/>
    </action-outputs>
    <component-definition>
    <by-row>false</by-row>
    <height>650</height>
    <width>300</width>
    <title>Call duration by Minute</title>
    <chart-attributes>
    <chart-type>BarChart</chart-type>
    <title-position>TOP</title-position>
    <title-font>
    <font-family>Tahoma</font-family>
    <size>14</size>
    <is-bold>false</is-bold>
    <is-italic>false</is-italic>
    </title-font>
    <range-title>Calls</range-title>
    <chart-background type="color">#ffffff</chart-background>
    <plot-background type="color">#ffffff</plot-background>
    <orientation>Horizontal</orientation>
    <is-3D>false</is-3D>
    <is-stacked>false</is-stacked>
    <category-label-rotation>180</category-label-rotation>
    <border-visible>false</border-visible>
    <border-paint>#3399FF</border-paint>
    <display-labels>true</display-labels>
    <include-legend>false</include-legend>
    <domain-title>Min.</domain-title>
    <domain-label-rotation>0</domain-label-rotation>
    <domain-label-rotation-dir>up</domain-label-rotation-dir>
    <color-palette>
    <color>#fece4d</color>
    </color-palette>
    </chart-attributes>
    </component-definition>
    </action-definition>
    Here I was attempting to print the domain-labels inside the bars. But as you can see it did not work out
    Any way out? Here again the labels are in one edge of bar.



    <action-definition>
    <component-name>ChartComponent</component-name>
    <action-type>Create The Chart</action-type>
    <action-inputs>
    <output-type type="string" mapping="chart-type"/>
    <chart-data type="result-set" mapping="chartData"/>
    </action-inputs>
    <action-outputs>
    <chart-filename type="string"/>
    <chart-map-html type="string"/>
    <base-url type="string"/>
    </action-outputs>
    <component-definition>
    <by-row>false</by-row>
    <height>300</height>
    <width>650</width>
    <title>Call duration by Minute</title>
    <chart-attributes>
    <chart-type>BarChart</chart-type>
    <title-position>TOP</title-position>
    <title-font>
    <font-family>Tahoma</font-family>
    <size>14</size>
    <is-bold>false</is-bold>
    <is-italic>false</is-italic>
    </title-font>
    <range-title>Calls</range-title>
    <chart-background type="color">#ffffff</chart-background>
    <plot-background type="color">#ffffff</plot-background>
    <orientation>Vertical</orientation>
    <is-3D>false</is-3D>
    <is-stacked>false</is-stacked>
    <category-label-rotation>180</category-label-rotation>
    <border-visible>false</border-visible>
    <border-paint>#3399FF</border-paint>
    <display-labels>true</display-labels>
    <include-legend>false</include-legend>
    <domain-title>Min.</domain-title>
    <domain-label-rotation>4.71</domain-label-rotation>
    <domain-label-rotation-dir>down</domain-label-rotation-dir>
    <color-palette>
    <color>#fece4d</color>
    </color-palette>
    </chart-attributes>
    </component-definition>
    </action-definition>
    Thanks,

    raj

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

    Default

    The ChartComponent is not part of the reporting engine. This message therefore gets moved into the BI-Server forum instead.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3
    Join Date
    Mar 2006
    Posts
    683

    Default

    raj,

    try to add something like this to your properties:
    Code:
    <property name="categoricalLabelFormat">{2}</property>
    you'll need to change the 2 in the "{2}" to some other number probably trial and error it try 0 to 4.

    I found this info out in my post here.

    http://forums.pentaho.org/showthread.php?t=55124

    It might not be what you are looking for. but it might help to get you close.

    Hope it helps,

    Nic


    After looking at your post a lil closer.. I don't think it will help. Sorry.
    Last edited by guzaldon; 07-31-2007 at 05:45 PM.
    Try not to have too much fun.
    - - - -
    Nic Guzaldo
    That guy who shows up here
    and there

  4. #4
    Join Date
    Jun 2007
    Posts
    16

    Default

    Quote Originally Posted by guzaldon View Post
    After looking at your post a lil closer.. I don't think it will help. Sorry.


    raj

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.