Scatter chart 3D Issue #4507

Closed
pawanvjadhav opened this Issue Aug 26, 2015 · 28 comments

Projects

None yet

6 participants

@pawanvjadhav

Scatter chart 3D with X and Y only. is working properly on Highchart 3D 4.1.5.

If you replace Highchart 3d 4.1.5 with latest release 4.1.8, points are not plotting.

Please check below URL:
URL with Highchart 3d 4.1.5
http://jsfiddle.net/pawanvjadhav/wymdqecq/3/

URL with Highchart 3d 4.1.8
http://jsfiddle.net/pawanvjadhav/wymdqecq/4/

@pawelfus
Collaborator

Responsible commit.

@pawelfus pawelfus added the Regression label Aug 26, 2015
@pawelfus
Collaborator

I'm not sure if this is a bug. I don't see z property for points. Is this intentional? See working demo: http://jsfiddle.net/wymdqecq/6/

@pawanvjadhav

Yes, this is intentionaly. We dont have Z axis value. We have to just display it as 3D. Just like we do it for Bar, Column charts. Actully this working fine on 4.1.5.

@pawanvjadhav

Are you going to fix this?

@pawelfus
Collaborator

Sure. I have just one question, compare results:

  • 4.1.5:
    screen shot 2015-08-27 at 11 36 39 am
  • bugfix:
    screen shot 2015-08-27 at 11 38 29 am

In 4.1.5 extremes were miscalculated too, but we didn't hide scatter points which were outside the extremes - issue with point outside extremes were fixed in 4.1.6, but extremes remain miscalculated.

In the bugfix screenshot, extremes are calculated properly, and points are placed in the middle of the chart (see bottom frame - gridline with z = 0). What do you think? It's better to render points on the front frame (like 4.1.5) or in the middle of chart (bugfix)? I think it's easier for user to read values when can project point on each of the axes.

@pawanvjadhav

I think, 4.1.5 is right.

In the screenshot of bugfix, it feels that, there is a Z Axis and its value is 0
So user may ask, what i have plotted on Z.

@pawelfus
Collaborator

Because that would be true - if point doesn't have set z then it would be set to 0. Similar how it works for x - if not set, then it's incremented by pointInterval.

@pawanvjadhav

Ok. I think, it should work similar to Bar / Column 3d.
There we dont need to specify Z axis. as we dont have requirement of Z Axis. We have to just show it as 3D.

@pawelfus
Collaborator

I will hold one with fixing this bug, @highslide-software - what do you think? zAxis should behave the same way as other ones, or we can allow zAxis to have NaN for extremes and we should just improve checking for isInside?

@salunkenagesh14

@pawelfus @pawanvjadhav
What about plotting points on the last frame If z values are NAN/ z values not present.

See this : http://jsfiddle.net/wymdqecq/7/
With different beta angle, still there will be a problem of user having a perception of possible z metrics.

Scatter 3D without a z axis is like showing 2D points inside the box/ on a single frame i.e. on a wall with box.
Your thoughts on this ?

@TorsteinHonsi
Collaborator

I would expect them to be plotted at z=0.

But there is a deeper problem - the scatter 3d chart redefines the scatter series type in these lines. Ideally, each series type in Highcharts should have its own data definition, but scatter is an exception. In 2d, the data is [x, y], while in 3d it expects [x, y, z]. One solution would be that we added a scatter3d series type, but then we would break a lot of existing functionality. So I guess we should just fix the missing z problem for now.

@pawelfus
Collaborator

I think this doesn't apply only to scatter series, let's see: http://jsfiddle.net/wymdqecq/8/ - columns are rendered on the front frame. I think it should be consistent between series. Though part: column series doesn't really consider z value.

Also, note that it's not about the format ([x, y] vs [x, y, z]) but not set option z when using {} object notation.

Wouldn't be enough to wrap applyOptions for scatter series' point? Simple example: http://jsfiddle.net/wymdqecq/10/

@pawanvjadhav

Are we moving towards for scatter 3d we should have Zaxis ?

@TorsteinHonsi
Collaborator

Yes, I think that an undefined z value should behave like 0, just like columns.

Wouldn't be enough to wrap applyOptions for scatter series' point? Simple example: http://jsfiddle.net/wymdqecq/10/

Yes, that's good.

Also, note that it's not about the format ([x, y] vs [x, y, z]) but not set option z when using {} object notation.

I know, but it's related. So in this case, the data is actually 2d, so the user could use a 2d scatter chart in 3d view.

@pawanvjadhav

@salunkenagesh14 I have seen this problem when we set beta to 90. It should plot points within frame. Not getting why points are outside of frame.
Plotting points on last frame looks good option: I think, result will come similar to @pawelfus :bugfix image.

@pawanvjadhav pawanvjadhav reopened this Sep 1, 2015
@pawanvjadhav

sorry, by mistake i clicked on close and comment.

@pawelfus
Collaborator
pawelfus commented Sep 1, 2015

@pawanvjadhav - regarding labels on zAxis:

There we dont need to specify Z axis. as we dont have requirement of Z Axis. We have to just show it as 3D.

We can hide labels when necessary, see: http://jsfiddle.net/wymdqecq/12/

@pawelfus
Collaborator
pawelfus commented Sep 1, 2015

@salunkenagesh14 - regarding frame:

What about plotting points on the last frame If z values are NAN/ z values not present.

It's not a bad idea. With the implementation mentioned above it can be achieved by setting min and max for zAxis, like this: http://jsfiddle.net/wymdqecq/13/ -what do you think?

@pawanvjadhav

@pawelfus looks good to me.

@salunkenagesh14

@pawelfus Yes. When number of points grow to large extent. Plotting on last frame makes sense to be able to analyze.
See the difference between http://jsfiddle.net/wymdqecq/15/ and http://jsfiddle.net/wymdqecq/17/

@pawelfus
Collaborator
pawelfus commented Sep 2, 2015

Just a reminder: we are only talking about the case when points don't have z value set.

@sebastianbochan
Collaborator

Seems that problem still appears.

Demo: http://jsfiddle.net/8mzdse8p/

@pawelfus
Collaborator

+1

@sebastianbochan
Collaborator

+1

@pawelfus
Collaborator
@TorsteinHonsi
Collaborator

@pawelfus Will you fix it?

@pawelfus pawelfus self-assigned this May 23, 2016
@pawelfus
Collaborator
pawelfus commented Jun 3, 2016

Fixed on bugfix branch: http://jsfiddle.net/eub7pz6a/

Where points are rendered (front or back frame), can be controlled by setting zAxis.min and zAxis.max:

@KacperMadej
Collaborator

+1

@TorsteinHonsi TorsteinHonsi added a commit that closed this issue Dec 1, 2016
@TorsteinHonsi TorsteinHonsi Fixed #4507, 3D scatter points were not rendered if z-value was not set.
# Conflicts:
#	js/highcharts-3d.src.js
#	js/parts-3d/Globals.js
#	js/parts-3d/Scatter.js
7620612
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment