Chart and Series types

User avatar
ErikJan
BronzeLounger
Posts: 1256
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Chart and Series types

Post by ErikJan »

I have a tool with many charts (most supposed to be XY scatter). I discovered that some charts are different (they have a separate element, see box. If I delete that, the X-axis labels disappear).
2021-02-09 13_36_14-Window.png
In the series I couldn't see anything odd, so I made some code to check the Chart.ChartType values and indeed, some were -4111 (and not 75). I couldn't initially find that value but discovered that this is "xlCombination" (which makes sense).

So for these charts I drilled deeper: I also went over the series, hoping most might be XY scatter and some not... Oddly enough, for all SeriesCollection.Type the value is -4169.

For starters, I can't find that value anyone who has an idea?

And in general, what's that box I see? The charts seem to behave normally as XY charts and series
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78558
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Chart and Series types

Post by HansV »

-4169 is a member of the XLChartType enum; its symbolic name is xlXYScatter.
That box looks like the x-axis, but I don't know how it came to overlap with the plot area - there is no way to resize the axis box.
Best wishes,
Hans

User avatar
ErikJan
BronzeLounger
Posts: 1256
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: Chart and Series types

Post by ErikJan »

OK, xlSYScatter is good.
Have you seen that box before as well?

User avatar
HansV
Administrator
Posts: 78558
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Chart and Series types

Post by HansV »

Here is a simple XYScatter chart with the x-axis selected:

S0105.png

The box around the axis looks like the one in your screenshot, except that it doesn't overlap with the plot area.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

User avatar
ErikJan
BronzeLounger
Posts: 1256
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: Chart and Series types

Post by ErikJan »

Ah, OK, that's what you mean. I'll try some more things to see if I can find out what happened (as there are some strange side effects I think). Will report here what I learn.

User avatar
ErikJan
BronzeLounger
Posts: 1256
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: Chart and Series types

Post by ErikJan »

I found it... It's the X-axis label position setting that does this. So not related to the chart contents...
2021 Feb 09 215218-Window.png
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 78558
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Chart and Series types

Post by HansV »

I think the chart got messed up somehow - even with Label Position set to Low, the box shouldn't overlap the plot area...
Best wishes,
Hans

User avatar
ErikJan
BronzeLounger
Posts: 1256
Joined: 03 Feb 2010, 19:59
Location: Terneuzen, the Netherlands

Re: Chart and Series types

Post by ErikJan »

No, I can reproduce easily. Create a XY scatter graph (with e.g. positive Y values). Change the Y-axis minimum to a value below 0.
Now select the x-axis, go to Axis Options then Labels and change the label position to Low (from "Next to Axis").
Next select the X-axis and you'll get the same behavior as I reported.

User avatar
HansV
Administrator
Posts: 78558
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Chart and Series types

Post by HansV »

Ah - I see now. Thanks for clearing that up.
Best wishes,
Hans