Multi-chart slider and colors for individual bars #169

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@bozdoz
Contributor

bozdoz commented Dec 19, 2012

RangeSlider now works with multiple charts and a single slider, by using an array with the graph variables:

var slider_three = new Rickshaw.Graph.RangeSlider({
    element: document.querySelector('#slider-range'),
    graph: [graph_one, graph_two, graph_three]
});

The bar chart renderer now looks for a proposed color for each individual bar, it will default to the chart-specific color if no color is declared:

var data = [{
  data: [{ 
    x: -1893456000, y: 29389330}, { 
    x: -1577923200, y: 33125803}, { 
    x: -1262304000, y: 37857633, color:'#06f'}, { 
    x: -946771200, y: 41665901, color:'#0cf'}
  ],
    color: '#222'
  }]

Multi-chart slider and colors for individual bars
RangeSlider now works with multiple charts and a single slider, by using an array with the graph variables:

var slider_three = new Rickshaw.Graph.RangeSlider({
    element: document.querySelector('#slider-range'),
    graph: [graph_one, graph_two, graph_three]
});

The bar chart renderer now looks for a proposed color for each individual bar, it will default to the chart-specific color if no color is declared:

var data = [{
  data: [{ 
    x: -1893456000, y: 29389330}, { 
    x: -1577923200, y: 33125803}, { 
    x: -1262304000, y: 37857633, color:'#06f'}, { 
    x: -946771200, y: 41665901, color:'#0cf'}
  ],
    color: '#222'
  }]

glasnt pushed a commit to WhereSoftwareGoesToDie/rickshaw that referenced this pull request Feb 23, 2014

Katie McLaughlin
Extend Range Slider to accept multiple graphs
Extend to allow array of graphs, and handle logic based on if the graph element
is singular or plural.

Also add examples/shared_slider.html as a demo of new functionality

Similar to pullr equest #169 (bozdoz)

@cesine cesine self-assigned this Apr 8, 2016

@cesine

This comment has been minimized.

Show comment
Hide comment
@cesine

cesine Nov 8, 2016

Collaborator

@bozdoz thanks! i moved your changes from the built file rickshaw.js into the src and tested them out you can now use them if you open the shared slider example: https://github.com/shutterstock/rickshaw/blob/master/examples/shared_slider.html

closing this PR :)

Collaborator

cesine commented Nov 8, 2016

@bozdoz thanks! i moved your changes from the built file rickshaw.js into the src and tested them out you can now use them if you open the shared slider example: https://github.com/shutterstock/rickshaw/blob/master/examples/shared_slider.html

closing this PR :)

@cesine cesine closed this Nov 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment