JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://igniteui.com/js/modernizr.min.js"></script>
<script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
<script src="https://cdn-na.infragistics.com/igniteui/latest/js/infragistics.core.js"></script>
<script src="https://cdn-na.infragistics.com/igniteui/latest/js/infragistics.dv.js"></script>
<script src="https://cdn-na.infragistics.com/igniteui/latest/js/infragistics.lob.js"></script>
<script src="https://igniteui.com/js-data/financial-data-random"></script>
<link href="https://cdn-na.infragistics.com/igniteui/latest/css/themes/infragistics/infragistics.theme.css" rel="stylesheet"></link>
<link href="https://cdn-na.infragistics.com/igniteui/latest/css/structure/infragistics.css" rel="stylesheet"></link>
<script id="tooltipTemplate" type="text/x-jquery-tmpl">
<span class="tooltip">${item.DateString}</span><br />
<span class="tooltip">Open: </span><span>${item.Open}</span><br />
<span class="tooltip">Low: </span><span>${item.Low}</span><br />
<span class="tooltip">High: </span><span>${item.High}</span><br />
<span class="tooltip">Close: </span><span>${item.Close}</span><br />
</script>
<div id="chartOverview"></div>
<div id="zoomOverview"></div>
<div id="buttonset" class="buttonset">
<input type="radio" id="day" name="radio"></input><label for="day">Day</label>
<input type="radio" id="week" name="radio"></input><label for="week">Week</label>
<input type="radio" id="month" name="radio"></input><label for="month">Month</label>
</div>
<div id="date">
</div>
<div id="popoverLeft"></div>
<div id="popoverRight"></div>
CSS
.buttonset
{
position: absolute;
top: 0px;
left: 50px;
z-index: 10000;
}
.buttonset > label
{
width: 60px;
height: 26px;
margin-right: -4px!important;
}
.tooltip{
font-weight: bold;
}
JavaScript
$(function () {
$(document).ready(function () {
var chartOverview = $("#chartOverview"),
zoombarOverview = $("#zoomOverview"),
popoverTimeout = 0,
popoverLeft,
popoverRight,
lastTarget,
currentlyDragged,
zoomParams;
chartOverview.igDataChart({
width: "100%",
height: "300px",
axes: [
{
name: "xAxis",
type: "categoryDateTimeX",
dataSource: financialData1,
dateTimeMemberPath: "Date",
labelVisibility: "visible"
},
{
name: "yAxis",
type: "numericY"
}
],
series: [
{
name: "series1",
dataSource: financialData1,
title: "Price Series",
type: "financial",
isTransitionInEnabled: true,
displayType: "ohlc",
xAxis: "xAxis",
yAxis: "yAxis",
openMemberPath: "Open",
highMemberPath: "High",
lowMemberPath: "Low",
showTooltip: true,
tooltipTemplate: "tooltipTemplate",
closeMemberPath: "Close",
thickness: 2,
trendLineBrush: "rgba(68, 172, 214, .8)",
trendLineThickness: 5,
trendLineType: "exponentialAverage",
negativeBrush: "rgba(198, 45, 54, .8)"
},
{
name: "series2",
dataSource: financialData2,
title: "Price Series",
type: "financial",
isTransitionInEnabled: true,
xAxis: "xAxis",
yAxis: "yAxis",
openMemberPath: "Open",
highMemberPath: "High",
lowMemberPath: "Low",
closeMemberPath: "Close",
thickness: 2,
showTooltip: true,
tooltipTemplate: "tooltipTemplate",
trendLineBrush: "rgba(73, 73, 73, .8)",
trendLineThickness: 5,
trendLineType: "exponentialAverage",
negativeBrush: "rgba(198, 45, 54, .8)",
displayType: "ohlc"
}
],
horizontalZoomable: true,
verticalZoomable: false,
windowResponse: "immediate",
refreshCompleted: function (e, ui) {
if ($("#chartOverview")[0] !== undefined &&...