Skip to content

Multi-chart slider and colors for individual bars #169

Open
wants to merge 1 commit into from

2 participants

@bozdoz
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'
  }]

@bozdoz bozdoz 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'
  }]
d0a692d
@glasnt glasnt pushed a commit to machiavellian/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)
8ba8312
@cesine cesine self-assigned this Apr 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.