Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example for diverging color #1591

Merged
merged 4 commits into from
Oct 19, 2016
Merged

Add example for diverging color #1591

merged 4 commits into from
Oct 19, 2016

Conversation

YuhanLu
Copy link
Contributor

@YuhanLu YuhanLu commented Oct 17, 2016

Provide example for #449
Modified doc for scale to include this example

modify doc for scale to include this example
@@ -0,0 +1,17 @@
{
"description": "A bubbleplot showing horsepower on x, miles per gallons on y, and binned acceleration on size.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description doesn't match

"field": "Weight_in_lbs",
"type": "linear",
"scale": {
"domain": [1100,2700,5200],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about ...

"domain": [1000,2750,4500],

(more rounded number)

@@ -186,6 +186,10 @@ For ordinal, quantitative, and time fields, `range` can be a two-element array d

<div class="vl-example" data-name="scatter_color_ordinal_custom"></div>

We can also create diverging color graph by specify `range` with multipe elements.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. typo multipe => multiple

  2. Maybe add

### Piecewise Scale Example: Diverging Color Scale
  1. in the example you also have to specify domain to match range, but that is not described here.

Maybe look at how Mike describe about piece wise case there so people understand the constraint better:
https://github.com/d3/d3-scale#continuous_domain

@YuhanLu
Copy link
Contributor Author

YuhanLu commented Oct 18, 2016

The previous requests have been done.

@@ -0,0 +1,17 @@
{
"description": "A bubbleplot showing horsepower on x, miles per gallons on y, and binned weight of diverging color.",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

binned weight? I don't see bin in the spec.

@kanitw kanitw merged commit 2d4b252 into master Oct 19, 2016
@kanitw kanitw deleted the zl/diverging-color branch October 19, 2016 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants