TimeChart icon indicating copy to clipboard operation
TimeChart copied to clipboard

fill background line

Open temaivanoff opened this issue 3 years ago • 9 comments

Hi, how hard is it to do?

temaivanoff avatar Aug 22 '22 07:08 temaivanoff

Sorry, what is background line?

huww98 avatar Aug 22 '22 07:08 huww98

@huww98 one color or gradient RdXEu

temaivanoff avatar Aug 22 '22 07:08 temaivanoff

Not simple. One would need to change the WebGL shader code to implement this. I don't have time this week.

huww98 avatar Aug 22 '22 07:08 huww98

@huww98 ok, can you make a minimal code of core to one file example to understand how to create graphs in WebGL ? it would help me to quickly learn WebGL, to help your project

temaivanoff avatar Aug 22 '22 08:08 temaivanoff

How about starting from https://huww98.github.io/TimeChart/demo/plugins/assemble.html All WebGL related code should be in https://github.com/huww98/TimeChart/blob/master/src/plugins/lineChart.ts

huww98 avatar Aug 22 '22 08:08 huww98

But lineChart.ts is big to learn hard as it contains the business logic. Need an example for fools 😄 if you have time and opportunity, try to do it, thanks a lot for the feedback 👍

temaivanoff avatar Aug 22 '22 08:08 temaivanoff

I'm thinking about this. It seems hard to correctly draw the background when a line segment is crossing zero.

huww98 avatar Oct 07 '22 15:10 huww98

@huww98 can you show me a test demo crossing zero?

temaivanoff avatar Feb 01 '23 09:02 temaivanoff

Sorry, test for what? I have not implemented this feature. By saying crossing zero, I mean data[n].y * data[n+1].y < 0, e.g. the first y is positive while the second y is negative.

huww98 avatar Feb 01 '23 09:02 huww98