Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Surface with different color #13

Open
kundansonu opened this issue May 31, 2018 · 1 comment
Open

Multiple Surface with different color #13

kundansonu opened this issue May 31, 2018 · 1 comment

Comments

@kundansonu
Copy link

kundansonu commented May 31, 2018

Hi,

I am able to render two surfaces, but I don't see any option to change the color of second surface, as we have only one option to set coloraxis and the other surface is also utilizing the same coloraxis, so do we have any way to change the color of the other surface.

https://ibb.co/g0hqiJ

Regards,
Kundan

@paulo-raca
Copy link
Owner

Hello, glad you like it.
Unfortunately I didn't have simultaneous surfaces in mind when I built it, so I don't have any good answer.

Also I won't have the time for a proper solution right now, but if you are not in a worry I should be able to work on it in the next 1-2 months. Or you can send me a pull request :)

In the mean time, I can think of a few terrible hacks:

One thing you should be able to do is having 2 distinct series, each one associated with a distinct coloraxis (I haven't tried that, but should be possible to do it the same way highchairs allows multiple X/Y axes on a chart). Unfortunately you'll probably have z-order issues (serie #2 will always be over serie #1, despite of 3d shape).

Another hack would be to embbed 2 distinct gradients into your coloraxis -- e.g. [0..0.5] can be a blue-ish gradient and [0.5..1] a red-ish gradient. Then you can keep the min/max fixed and manually calculate the associated value for each vertex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants