jbkunst / jbkunst/highcharter

scatter plot with colorAxis

Open
#396 4 comments 0 reactions 0 assignees View on GitHub
enhancement
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()
```

![image](https://user-images.githubusercontent.com/209714/36069208-12d805d2-0eb3-11e8-8fdc-714fe3fd528f.png)

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.