# Chart customization

**URL:** <https://forum.inductiveautomation.com/t/chart-customization/3978>\
**Category:** Ignition\
**Created:** [February 10, 2012, 4:45pm UTC](https://forum.inductiveautomation.com/t/chart-customization/3978 "2012-02-10T16:45:22Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![marioquark](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@marioquark](https://forum.inductiveautomation.com/u/marioquark)\
**Post date:** [February 10, 2012, 4:45pm UTC](https://forum.inductiveautomation.com/t/chart-customization/3978/1 "2012-02-10T16:45:22Z")

</div>

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 😒 )  
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!

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [February 10, 2012, 6:09pm UTC](https://forum.inductiveautomation.com/t/chart-customization/3978/2 "2012-02-10T18:09:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![marioquark](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@marioquark](https://forum.inductiveautomation.com/u/marioquark)\
**Post date:** [February 13, 2012, 9:00am UTC](https://forum.inductiveautomation.com/t/chart-customization/3978/3 "2012-02-13T09:00:44Z")

</div>

here i am:

1- Bar Chart we already have:

- value labels are not customizable (on the top, horizontal) ☹
- same scale ☹
- no overlapped bars

2- Classic Chart we already have:

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

3- GIMP edited Chart 🙂

- value labels 🙂
- side by side bars 🙂
- different scales 🙂

---

<div class="post-metadata">

**Author:** ![marioquark](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@marioquark](https://forum.inductiveautomation.com/u/marioquark)\
**Post date:** [February 13, 2012, 9:01am UTC](https://forum.inductiveautomation.com/t/chart-customization/3978/4 "2012-02-13T09:01:38Z")

</div>

sorry… hi res: ![](http://www.freeimagehosting.net/newuploads/4yvfs.png)

---

<div class="post-metadata">

**Author:** ![ecujak](https://avatars.discourse-cdn.com/v4/letter/e/839c29/32.png) [@ecujak](https://forum.inductiveautomation.com/u/ecujak)\
**Post date:** [February 16, 2012, 3:31pm UTC](https://forum.inductiveautomation.com/t/chart-customization/3978/5 "2012-02-16T15:31:13Z")

</div>

I am interested as well.

---

<div class="post-metadata">

**Author:** ![marioquark](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@marioquark](https://forum.inductiveautomation.com/u/marioquark)\
**Post date:** [March 14, 2012, 10:03am UTC](https://forum.inductiveautomation.com/t/chart-customization/3978/6 "2012-03-14T10:03:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [March 14, 2012, 3:03pm UTC](https://forum.inductiveautomation.com/t/chart-customization/3978/7 "2012-03-14T15:03:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [May 9, 2012, 8:16pm UTC](https://forum.inductiveautomation.com/t/chart-customization/3978/8 "2012-05-09T20:16:45Z")

</div>

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](http://www.java2s.com/Code/Java/Chart/JFreeChartDualAxisDemo5.htm).
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](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/75c1387c121fb46f23f7a145e22f5c8d283f5831.proj) (16.7 KB)  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/6/654ef67f09bd3b595b0984a81f22c44313d9b31e.png)

---

<div class="post-metadata">

**Author:** ![marioquark](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@marioquark](https://forum.inductiveautomation.com/u/marioquark)\
**Post date:** [May 10, 2012, 2:23pm UTC](https://forum.inductiveautomation.com/t/chart-customization/3978/9 "2012-05-10T14:23:08Z")

</div>

good work.  
anyway this doesn’t fit my needs ☹ 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

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [May 11, 2012, 10:20pm UTC](https://forum.inductiveautomation.com/t/chart-customization/3978/10 "2012-05-11T22:20:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![marioquark](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@marioquark](https://forum.inductiveautomation.com/u/marioquark)\
**Post date:** [May 14, 2012, 7:58am UTC](https://forum.inductiveautomation.com/t/chart-customization/3978/11 "2012-05-14T07:58:27Z")

</div>

> [@](#):
>
> 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.

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

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [May 14, 2012, 4:06pm UTC](https://forum.inductiveautomation.com/t/chart-customization/3978/12 "2012-05-14T16:06:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![marioquark](https://avatars.discourse-cdn.com/v4/letter/m/22d042/32.png) [@marioquark](https://forum.inductiveautomation.com/u/marioquark)\
**Post date:** [February 12, 2014, 1:08pm UTC](https://forum.inductiveautomation.com/t/chart-customization/3978/13 "2014-02-12T13:08:52Z")

</div>

the customization using python is unbelievable 🙂  
thank you for the example
