google / google-visualization-issues

288 stars 35 forks source link

box whisker plot #782

Open orwant opened 9 years ago

orwant commented 9 years ago
What would you like to see us add to this API?

It would be nice to have a Box Whisker plot similar to those generated using Image
Charts.

What component is this issue related to (PieChart, LineChart, DataTable,
Query, etc)?

Candlestick Charts

*********************************************************
For developers viewing this issue: please click the 'star' icon to be
notified of future changes, and to let us know how many of you are
interested in seeing it resolved.
*********************************************************

Original issue reported on code.google.com by yimmieg on 2012-01-10 19:28:11

orwant commented 9 years ago
Hello,
I have customized a combo chart with candlestics and and hidden lines(with points)
for creating a box-alike chart. Here you can see candlesticks and 2 lines for (median
and mean).
I hope it helps you!

function drawVisualization() {
  // Create and populate the data table. Column 6: median, Column 7: mean. Values are
invented!
var data = google.visualization.arrayToDataTable([

          ['Serie1', 20, 28, 38, 45, 20, 25],
          ['Serie2', 31, 38, 55, 66, 30, 35],
          ['Serie3', 50, 55, 77, 80, 10, 15],
          ['Serie4', 77, 77, 66, 50, 20, 25],
          ['Serie5', 68, 66, 22, 15, 30, 35]
          // Treat first row as data as well.
        ], true);

  // Create and draw the visualization.
  var ac = new google.visualization.ComboChart(document.getElementById('visualization'));
  ac.draw(data, {
    title : 'Box Plot with Median and Average',
    width: 600,
    height: 400,
    vAxis: {title: "Value"},
    hAxis: {title: "Serie ID"},
    series: { 0: {type: "candlesticks"}, 1: {type: "line", pointSize: 10, lineWidth:
0 }, 2: {type: "line", pointSize: 10, lineWidth: 0, color: 'black' } }
  });
}

Original issue reported on code.google.com by manuelpalacin on 2013-04-18 11:10:22

orwant commented 9 years ago
Now with legend titles:

******************************

function drawVisualization() {
  // Create and populate the data table.
var data = google.visualization.arrayToDataTable([
          ['ID', 'IQR', '', '', '', 'Median', 'Average'],
          ['Serie1', 20, 28, 38, 45, 20, 25],
          ['Serie2', 31, 38, 55, 66, 30, 35],
          ['Serie3', 50, 55, 77, 80, 10, 15],
          ['Serie4', 77, 77, 66, 50, 20, 25],
          ['Serie5', 68, 66, 22, 15, 30, 35]
          // Treat first row as data as well.
        ]);

  // Create and draw the visualization.
  var ac = new google.visualization.ComboChart(document.getElementById('visualization'));
  ac.draw(data, {
    title : 'Box Plot with Median and Average',
    width: 600,
    height: 400,
    vAxis: {title: "Value"},
    hAxis: {title: "Serie ID"},
    series: { 0: {type: "candlesticks"}, 1: {type: "line", pointSize: 10, lineWidth:
0 }, 2: {type: "line", pointSize: 10, lineWidth: 0, color: 'black' } }
  });
}

Original issue reported on code.google.com by manuelpalacin on 2013-04-18 12:09:56

sopanshelar commented 4 years ago
Now with legend titles:

******************************

function drawVisualization() {
  // Create and populate the data table.
var data = google.visualization.arrayToDataTable([
          ['ID', 'IQR', '', '', '', 'Median', 'Average'],
          ['Serie1', 20, 28, 38, 45, 20, 25],
          ['Serie2', 31, 38, 55, 66, 30, 35],
          ['Serie3', 50, 55, 77, 80, 10, 15],
          ['Serie4', 77, 77, 66, 50, 20, 25],
          ['Serie5', 68, 66, 22, 15, 30, 35]
          // Treat first row as data as well.
        ]);

  // Create and draw the visualization.
  var ac = new google.visualization.ComboChart(document.getElementById('visualization'));
  ac.draw(data, {
    title : 'Box Plot with Median and Average',
    width: 600,
    height: 400,
    vAxis: {title: "Value"},
    hAxis: {title: "Serie ID"},
    series: { 0: {type: "candlesticks"}, 1: {type: "line", pointSize: 10, lineWidth:
0 }, 2: {type: "line", pointSize: 10, lineWidth: 0, color: 'black' } }
  });
}

Original issue reported on code.google.com by manuelpalacin on 2013-04-18 12:09:56

how to plot this chart horizontally