Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: CTools Bar Chart Colors

  1. #1
    Join Date
    Oct 2013

    Default CTools Bar Chart Colors

    Hi guys,
    I need to generate a very simple bar chart showing:

    A - 43
    B - 46
    C - 26

    Name:  Demo.jpg
Views: 371
Size:  4.8 KB

    But I need each of these 3 bars to have a different color.
    Is this doable without "grouping" the series?


  2. #2
    Join Date
    Mar 2012



    so you want to make the bar color change per category?

    Specify the option «colorRole: 'category'».
    This will bind the visual element's color to the 'category' dimension.
    Hiding the legend might be a good idea, as it will contain redundant information.

    This can be done whether or not you have a series dimension.
    In this type of chart, when there's no data for the series dimension, one is still created.
    All rows will have a null value, and thus belong to the same "inexistent" series.

    The color is, by default, bound to the "series" dimension(s) value.
    But you can change this and let the "series" dimension only affect visual element connectedness, stacking groups, etc.

    Edit: just remembered, there's a boxplot example showing this same technique.
    Last edited by duarte.leao; 10-02-2013 at 07:31 AM. Reason: Added example link.

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.