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

spectra displayer & tracking line #935

Closed
NPellet opened this issue Jul 11, 2016 · 9 comments
Closed

spectra displayer & tracking line #935

NPellet opened this issue Jul 11, 2016 · 9 comments

Comments

@NPellet
Copy link
Owner

NPellet commented Jul 11, 2016

Hey @targos,
I implemented a basic method to allow the tracking line on individual series:
graph.getSerie("CA").allowTrackingLine( {} );
Does not need any prior options given to the graph instance. Can you implement an option in the visualizer. This way, when it breaks, I'll know soon enough :D

@targos
Copy link
Collaborator

targos commented Jul 11, 2016

Trying to implement this, I get the following error:

Unhandled rejection TypeError: Cannot read property 'map' of undefined
    at EventEmitter.trackingLine (http://localhost/github/visualizer/src/components/jsgraph/dist/jsgraph.js:3086:27)
    at EventEmitter.addSerieToTrackingLine (http://localhost/github/visualizer/src/components/jsgraph/dist/jsgraph.js:3121:18)
    at EventEmitter.Graph.build../series/graph.serie.Serie.allowTrackingLine (http://localhost/github/visualizer/src/components/jsgraph/dist/jsgraph.js:11658:20)

@NPellet
Copy link
Owner Author

NPellet commented Jul 11, 2016

Ah sorry, forgot to release. Try now

2016-07-11 10:36 GMT+02:00 Michaël Zasso notifications@github.com:

Trying to implement this, I get the following error:

Unhandled rejection TypeError: Cannot read property 'map' of undefined
at EventEmitter.trackingLine (http://localhost/github/visualizer/src/components/jsgraph/dist/jsgraph.js:3086:27)
at EventEmitter.addSerieToTrackingLine (http://localhost/github/visualizer/src/components/jsgraph/dist/jsgraph.js:3121:18)
at EventEmitter.Graph.build../series/graph.serie.Serie.allowTrackingLine (http://localhost/github/visualizer/src/components/jsgraph/dist/jsgraph.js:11658:20)


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#935 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ABal24zlW1bSgVzNYQBIT9iTrO34cPJpks5qUgCHgaJpZM4JJHrX
.

@targos
Copy link
Collaborator

targos commented Jul 11, 2016

So this is just adding a rectangle with the value of the current point ?

@targos
Copy link
Collaborator

targos commented Jul 11, 2016

I mean even if I don't call allowTrackingLine(), there is still the black moving dot

@NPellet
Copy link
Owner Author

NPellet commented Jul 11, 2016

Yes this is the most minimalistic way.
If you don't want common tracking, you can use graph.trackingLine( { mode:
"common", textMethod: function( data ) { return "content" } } );

You want to keep the mode individual (each serie has its legend), then you
can use serie.allowTrackingLine( { textMethod: function( data ) { return
"content for only one serie"; } } );

2016-07-11 10:46 GMT+02:00 Michaël Zasso notifications@github.com:

So this is just adding a rectangle with the value of the current point ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#935 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ABal2_-JXccSxwPSWTZ04WXieMPqmnxKks5qUgLMgaJpZM4JJHrX
.

@NPellet
Copy link
Owner Author

NPellet commented Jul 11, 2016

Ah but that's because you called graph.trackingLine, no ?

2016-07-11 10:48 GMT+02:00 Norman Pellet norman.pellet@gmail.com:

Yes this is the most minimalistic way.
If you don't want common tracking, you can use graph.trackingLine( { mode:
"common", textMethod: function( data ) { return "content" } } );

You want to keep the mode individual (each serie has its legend), then you
can use serie.allowTrackingLine( { textMethod: function( data ) { return
"content for only one serie"; } } );

2016-07-11 10:46 GMT+02:00 Michaël Zasso notifications@github.com:

So this is just adding a rectangle with the value of the current point ?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#935 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ABal2_-JXccSxwPSWTZ04WXieMPqmnxKks5qUgLMgaJpZM4JJHrX
.

@targos
Copy link
Collaborator

targos commented Jul 11, 2016

No I never called this method. I use options.onMouseMoveData to enable mouse tracking

@NPellet
Copy link
Owner Author

NPellet commented Jul 11, 2016

Ah yes so onmousemovedata has no visual feedback. The tracking line is
exclusively for visuals. I wanted to make something similar to

http://webbook.nist.gov/cgi/cbook.cgi?ID=C7732185&Units=SI&Mask=2&Type=JANAFL&Plot=on#JANAFL

2016-07-11 10:52 GMT+02:00 Michaël Zasso notifications@github.com:

No I never called this method. I use options.onMouseMoveData to enable
mouse tracking


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#935 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/ABal23qZ-tE0SepJC1SZRsLRX97kZb_iks5qUgRdgaJpZM4JJHrX
.

@targos
Copy link
Collaborator

targos commented Jul 11, 2016

implemented in d047303

@targos targos closed this as completed Jul 11, 2016
@targos targos removed their assignment Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants