Chart customization

hi,
i’m currently developing an analysis tool using the classic chart component.
i need a bar chart with mainly 3 features:

  • values on each bar
  • different scales, because there are 2 kinds of measure, side by side
    problem 1: the bar chart doen’t offer multiple scales, so i’ve gone classic… but the classic chart doesn’t have value on each bar! (i think :unamused: )
    problem 2: i need also to show a sort of correlation between the 2 series, so it could be a good feature the shifting of the second bar set (now completely overlapped to the other).
    is there a solution?
    thank you very much!

Can you draw a picture of what you’re going for? I’m not sure that we’re going to be able to do it, but a picture would help.

here i am:

1- Bar Chart we already have:

  • value labels are not customizable (on the top, horizontal) :frowning:
  • same scale :frowning:
  • no overlapped bars

2- Classic Chart we already have:

  • no value labels :frowning:
  • overlapped bars layers: if the value of the bar behind is lower we can’t see it :frowning:
  • different scales

3- GIMP edited Chart :slight_smile:

  • value labels :slight_smile:
  • side by side bars :slight_smile:
  • different scales :slight_smile:

sorry… hi res:

I am interested as well.

nothing new about this in 7.4?
i’m testin it but i can’t see anything new…

No, nothing new in 7.4. We will keep this in mind though.

Ok I spent some time working on this, and the good news is that it can be done (today!). The bad news is that they way to do it is a bit of a hack.

There are two “hacks” to make this work.

  1. You need to put filler columns full of nulls into your datasets to get the bars to offset correctly. I didn’t make this up!, it’s straight out of the JFreeChart examples.
  2. You’ll need to run a script that turns on the labels for the bars. Note that the chart gets re-created when some of its properties change, so you may want to run this script periodically on a time to make sure the labels don’t dissapear.

I’ve attached a window that makes use of these two concepts. Good luck.
Multi Axis Bar Chart Example.proj (16.7 KB)

good work.
anyway this doesn’t fit my needs :frowning: because:

  • the label is hidden if the columns are too thin (that is always because my number of columns is almost always > 20)
  • the bars have shadows and gradients, not so nice for our customers
  • i must use category bars (i think): the X axis values (datetime) can’t have an angle

The bar chart component does have a property called “Category Axis Label Angle” which allows the X-axis values to be angled and more visible.

as i expected i get labels moving on the top and then again on the bars at every graph auto-refresh.
i suppose the cause is the timed overriding of the bar renderer instead of its substitution.
is there a way to have the renderer substituted?
tnx

You should be able to do whatever you want to the position of the labels. Take a look at the script that makes the labels appear and you’ll notice all sorts of angle and position arguments that you can play with.

the customization using python is unbelievable :slight_smile:
thank you for the example