SandDance icon indicating copy to clipboard operation
SandDance copied to clipboard

fixed legend range

Open mzy2240 opened this issue 6 years ago • 11 comments

Howdy, do you know how to fix the legend? The values in the legend always change, and I tried to change the legend directly but it will not render anyway. Thanks!

mzy2240 avatar Nov 08 '19 04:11 mzy2240

Hello @mzy2240 can you please provide perhaps a screenshot and more detail of what you are trying to achieve?

danmarshall avatar Nov 08 '19 05:11 danmarshall

@danmarshall Hey Dan, I'm trying to make it work with real time data. Now everything is working, unless the values in the legend keep changing. For example, at beginning all data are within 1-1.2 which is the safe zone, so the color should be all blue; and later some data starts to drop so they should become red or something. However, right now because the legend value keeps changing, so all the points are always blue to red, so color becomes meaningless.

mzy2240 avatar Nov 08 '19 05:11 mzy2240

Thanks for the clarification @mzy2240 . Realtime is a scenario we haven't necessarily considered yet. Which component are you using?

danmarshall avatar Nov 08 '19 16:11 danmarshall

@danmarshall I'm using the pure SandDance core with Vue.

mzy2240 avatar Nov 08 '19 18:11 mzy2240

Just a thought: perhaps you can prime your dataset with a couple of rows of data which specify the min and max of the range.

danmarshall avatar Nov 08 '19 18:11 danmarshall

Is it possible to pass a fixed a legend option when calling the render function?

mzy2240 avatar Nov 08 '19 19:11 mzy2240

Well, you can always just hide the legend and render your own.

danmarshall avatar Nov 08 '19 19:11 danmarshall

However, hide the legend will still change the colormap

mzy2240 avatar Nov 08 '19 19:11 mzy2240

what if I want to have a colormap for data over 1 even if there is no data in that range?

mzy2240 avatar Nov 08 '19 19:11 mzy2240

Sorry, I forgot that you can intercept the intermediary scenegraph prior to rendering. In your options, add an onStage handler. The stage object will contain the legend that you may modify. Sorry that some of these docs are not linking correctly. 😐

danmarshall avatar Nov 08 '19 19:11 danmarshall

Thanks a lot! Yeah thats another issue I want to report. Most of the doc links are btoken, it's really hard to code without doc.

mzy2240 avatar Nov 08 '19 19:11 mzy2240

Hello, we've got new docs. If this is still an issue, please feel free to re-open it.

danmarshall avatar Jan 04 '23 04:01 danmarshall