Sreejith
Sreejith

Reputation: 166

Bubble Charts with Line Chart

Is there any chart library that supports line chart and bubble chart togather? Or is there any way to make it possible? I tried in Kendo charts, d3 charts, rgraph, fussion chart etc.. didnt found any combaniation for bubble and line.

The chart i need should look almos!t list this. enter image description here

Upvotes: 1

Views: 187

Answers (1)

Cyril Cherian
Cyril Cherian

Reputation: 32327

I have two datasets. In my example I first draw the bubble chart with dataset

var monthlySales = [{
    'stock': 'GOOG',
        'count': 500
}, {
    'stock': 'MSFT',
        'count': 250
}, {
    'stock': 'FB',
        'count': 50
}, {
    'stock': 'AAPL',
        'count': 100
}, {
    'stock': 'EBAY',
        'count': 5
}, {
    'stock': 'BABA',
        'count': 37
}];

Then Draw The line with another dataset

var data = [{
      "month": "January",
      "high": "59.5",
      "low" : "57.0"
    }, {
      "month": "February",
      "high": "59.5",
      "low" : "53.4"
    }, {
      "month": "March",
      "high": "59.0",
      "low" : "53.4"
    }, {
      "month": "April",
      "high": "62.4",
      "low" : "54.7"
    }, {
      "month": "May",
      "high": "58.3",
      "low" : "52.7"
    }, {
      "month": "June",
      "high": "62.1",
      "low" : "54.5"
    }, {
      "month": "July",
      "high": "60.8",
      "low" : "53.4"
    }, {
      "month": "August",
      "high": "61.0",
      "low" : "52.5"
    }, {
      "month": "September",
      "high": "62.4",
      "low" : "52.9"
    }, {
      "month": "October",
      "high": "65.3",
      "low" : "54.0"
    }, {
      "month": "November",
      "high": "70.3",
      "low" : "55.0"
    }, {
      "month": "December",
      "high": "82.2",
      "low" : "58.6"
    }];

The working code is here: http://jsfiddle.net/cyril123/asdnypb2/9/.

Upvotes: 1

Related Questions