No primary series with a quote feed
Sample of how to render a chart with no primary series using a quote feed. Each series has it's own y axis
by sonylnagale
HTML
<link rel="stylesheet" type="text/css" href="https://jsfiddle.chartiq.com/chart/css/stx-chart.css" media="screen" />
<div class="chartContainer" style="width:600px;height:400px;position:relative;"></div>
JavaScript
import { CIQ } from "https://jsfiddle.chartiq.com/chart/js/standard.js";
import "https://jsfiddle.chartiq.com/chart/js/addons.js";
import quoteFeedSimulator from "https://jsfiddle.chartiq.com/chart/examples/feeds/quoteFeedSimulator.js";
// start the chart engine
const stxx = new CIQ.ChartEngine({
container: document.querySelector(".chartContainer")
});
// see spacial changes below required on update and pagination calls
// when there will be no primary series.
stxx.attachQuoteFeed(quoteFeedSimulator, {
refreshInterval: 1
});
stxx.loadChart("AAPL");
stxx.setPeriodicity({
unit: "minute"
})
new CIQ.ExtendedHours({ stx: stxx, filter: true });
stxx.extendedHours.prepare(true);
stxx.chart.customChart = {
colorFunction: (stx, quote, mode) => {
return (stx.chart.market.getSession(quote.DT) !== '') ? "red" : "green";
},
chartType: "extendedHoursChart"
}
stxx.setChartType("extendedHoursChart");