twosigma / twosigma/beakerx

make tick label format into a settable property

Open
#5,044 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
2.9k
Forks
383
PR merge metrics
No merged PRs in 30d

Description

for Plot and TimePlot classes, implement new properties xTickLabel and yTickLabel.
In groovy, the values of these labels are closures so you can write code like this:
```
import java.text.DecimalFormat
DecimalFormat myFormatter = new DecimalFormat("\$###,###.###");
new Plot(... ,yTickLabel: { y -> myFormatter.format(y) })
```

this is nontrivial because the closure has to run in the kernel, but the values that need to be formatted are not known when the JSON for the plot is generated. so, as the JS runs eventually it will come up with the ticks that need labels, and these need to be sent back to the server via comm (some widget callback).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the Plot and TimePlot classes and tracing how their JSON is generated and how JavaScript discovers tick values. Then map the kernel comm or widget-callback path needed to run the Groovy closures for those values; done means both xTickLabel and yTickLabel can format labels through the described property syntax.

Written by the indexing model from the issue text.

Assessment

Tech stack
groovy, javascript, jupyter
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.