Chart.ewo - bar chart (axis scaling, margin, bar width)

Find and share HowTos to various installations / configurations!
5 posts • Page 1 of 1
setschel
Posts:10
Joined: Thu Oct 14, 2021 12:50 pm

Chart.ewo - bar chart (axis scaling, margin, bar width)

Post by setschel »

Hello WinCC OA community,

I am working with Chart.ewo function (bar chart) in WinCC OA V3.17 (on Linux system) and have a few questions:

1)
I want to scale my chart with function addAxis/setAxis.
In the example panel (3.17/Panels/examples/chartewo/subPanels/bars.pnl) it is done in the ScopeLib in line 72:

Code: Select all

shChart.addAxis(0, fMax + 0.1 * fMax, g_chartXaxes);
Changing the first parameter (min) from 0 to 1500:

Code: Select all

shChart.addAxis(1500, fMax + 0.1 * fMax, g_chartXaxes);
This change will display the axis on the left side from 1500 to ca. 13000 correctly. But the bars are also increasing. For the first bar (blue line on Monday) the value, which is displayed, toggles still from 8456 to 10456, but the bar height is up to 9956 and 11956 (1500 bigger).

Workaround would be to substract from every value the min parameter (1500). Is there another/better solution?


2)
Is there a possibility to change the margin in an ewo chart (analog to the trend function areaMargin)?
In case it is, can you please explain how to do it?


3)
Is there a possibility to change the width of the bars?
In case it is, can you please explain how to do it?

Please let me know if I have expressed myself in an incomprehensible way.

Thank you in advance for your support.

Kind regards

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Chart.ewo - bar chart (axis scaling, margin, bar width)

Post by leoknipp »

I have tested it in 3.18 + P006.

1) It works correctly when the minimum/maximum value is set with addAxis or setAxis.

2) It looks like there is no option to set the margins for the widget.

3) Why do you think that the widdth can be changed?
Where have you seen it?

Best Regards
Leopold Knipp
Senior Support Specialist

setschel
Posts:10
Joined: Thu Oct 14, 2021 12:50 pm

Re: Chart.ewo - bar chart (axis scaling, margin, bar width)

Post by setschel »

First of all: thanks for your reply.

1) I have tested it with V3.18 P004 now and here it does work for me as well. Unfortunately we still use V3.17 at the moment and here I have the problem described in my first post (I have tested it in V3.17 P014). Maybe it is possible for you to check it in V3.17.

2) Ok, thanks for the information.

3) I was asking if it is possible. According to your answer I assume it is not possible.

Kind regards

leoknipp
Posts:2928
Joined: Tue Aug 24, 2010 7:28 pm

Re: Chart.ewo - bar chart (axis scaling, margin, bar width)

Post by leoknipp »

As far as I can remember my test in 3.17 did not work.
It looks like it is only fixed in 3.18.

Best Regards
Leopold Knipp
Senior Support Specialist

setschel
Posts:10
Joined: Thu Oct 14, 2021 12:50 pm

Re: Chart.ewo - bar chart (axis scaling, margin, bar width)

Post by setschel »

First of all: happy new year!
Thank you for your reply, good to know, that it is a bug in V3.17.

I think I found another bug (3.17 and also in 3.18) regarding the bar chart scaling.
Using the example panel again (3.18/Panels/examples/chartewo/subPanels/bars.pnl) and changing the first parameter (min) from 0 to 500 (line 72 in ScopeLib):

Code: Select all

shChart.addAxis(500, fMax + 0.1 * fMax, g_chartXaxes);
The horizontal grid line for value 0 is with this setting displayed below the diagram area (in the height of the labels "Monday", "Tuesday",...). For 1500 it is out of the diagram window, therefore I guess it is not displayed for my first example.

Maybe you can check this bug and give me a short feedback.

Thanks in advance!

5 posts • Page 1 of 1