Adding a series with no quoteFeed
by sonylnagale
HTML
<link rel="stylesheet" href="https://jsfiddle.chartiq.com/chart/css/stx-chart.css">
<div class="chartContainer" style="width:100%;height:400px;position:relative;"></div>
<script src="https://jsfiddle.chartiq.com/chart/js/chartiq.js"></script>
JavaScript
// Declare a CIQ.ChartEngine object.
// This is the main object for drawing charts.
// Here is where you set all required defaults.
var stxx = new CIQ.ChartEngine({
container: $$$(".chartContainer"),
layout: {
"chartType": "line",
"periodicity": 1,
"interval": 'day',
}
});
//Now load a chart with it's data
stxx.loadChart(
"SPY", [{
"Date": "1993-01-29",
"Close": 43.94
},
{
"Date": "1993-02-01",
"Close": 44.25
},
{
"Date": "1993-02-02",
"Close": 44.34
},
{
"Date": "1993-02-03",
"Close": 44.81
},
{
"Date": "1993-02-04",
"Close": 45
},
{
"Date": "1993-02-05",
"Close": 44.97
},
{
"Date": "1993-02-08",
"Close": 44.97
},
{
"Date": "1993-02-09",
"Close": 44.66
},
{
"Date": "1993-02-10",
"Close": 44.72
}
],
function() {
stxx.addSeries(
"Bid-Line-1", {
color: 'red',
data: [{
Date: "1993-02-04",
Close: 40
},
{
Date: "1993-02-05",
Close: 41
},
{
Date: "1993-02-08",
Close: 41.2
},
{
Date: "1993-02-09",
Close: 38
},
{
Date: "1993-02-10",
Close: 41.5
}
],
shareYAxis: true
}
)
}
);