scatter plot with colorAxis
- Dominant language
- R
- Stars
- 739
- Forks
- 153
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 1
Description
Can I use a color scale with scatter plots?
[Your comment on this Stackoverflow question][1] suggests it is not possible:
> This is a highchartsjs restriction, by now, you can't use or put a colorAxis in a scatter plot on highcharts – jbkunst May 19 '17 at 14:55
[1]: https://stackoverflow.com/questions/44071866/using-coloraxis-in-a-bubble-chart-in-highcharter-r
The related issue #317 has a hack that suggests this might be possible.
Here's my plot:
```r
library(highcharter)
hchart(mtcars, "scatter", hcaes(x = wt, y = mpg, color = qsec)) %>%
hc_colorAxis()
```

There are two problems:
1. The colors in the scale do not match the colors of the points.
2. The color scale does not have tick marks.
---
By the way, thank you for your fantastic work! Your package is a valuable contribution for the R community. 👍
Contributor guide
Research direction
Start by reproducing the mtcars scatter plot using hchart(..., "scatter", hcaes(...)) with hc_colorAxis(). Read related issue #317 and the linked Stack Overflow question to understand the existing workaround and expected behavior. Done means the color scale matches the scatter-point colors and displays tick marks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100