holoviz / holoviz/datashader

create_ramp_legend only show legend partially when max value is high

Open
#269 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
3.6k
Forks
376
Avg merge
4h 32m
Merged PRs (30d)
1

Description

I am producing a property value (up to $22,900,000) map and I want to add a ramp legend based on the values. However, the ramp legend always showed up partially, meaning only the colors corresponding to the lower values were rendered but not those for higher values.

I noticed in bokeh_ext.py, line 410:

----------------------------------------
legend_fig.image_rgba(image=[img.values],
x=[min_val],
y=[0],
dw=[max_val - min_val],
dh=[18],
dw_units='screen')

----------------------------------------
"dw" is supposed to be the width of the legend? not the value range, right? Anyway, if I set it to an arbitrary value such as 900, I can get the full legend.

Let me know if I am looking at the right place or something I am missing in my understanding.

Thanks.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.