<!DOCTYPE html>
<html lang="en-US">

<head>
<meta charset="UTF-8">
<title>Smart Agri</title>
<meta name="description" content=""/>
<meta name="viewport" content="width=device-width, initial-scale=1">


<!-- Stylesheets -->

<!-- Add site Favicon -->
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon">
<link rel="icon" href="images/favicon.ico" type="image/x-icon">

<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/all.css" rel="stylesheet" type="text/css">
<link href="css/select2.css" rel="stylesheet" type="text/css">	
<link href="css/styled.css" rel="stylesheet">


</head>

<body>
<div class="">
	<div class="top-filter">
		<div class="row">
			<div class="col-md-12">
				<div class="form-group">
					<select class="select2 form-select">
						<option value=""> Slect Station </option>
						<option value=""> Station One</option>
					</select>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="">
	<div class="container-fluid">
		<div class="row">
			<div class="col-md-12">
				<div class="d-flex justify-content-between align-items-center mb-3 mt-3">
					<div>
						<h4 class="m-0">Cotton </h4>
						<p class="m-0">FUSARIUM RISK</p>
					</div>
					
					<form>
						<div class="d-flex">
							<select class="form-select select2">
								<option value="1">Hourly Data</option>
							</select>
							<button type="submit" class="ms-2 btn btn-primary">
								Go
							</button>
						</div>
						
					</form>
				</div>
				
			</div>
			<div class="col-md-12 mb-3">
				<h5 class="mb-2">Infection %</h5>
				<div id="chartdiv" style="height: 320px;border:1px solid #eee;"></div>
			</div>
				
			
			<div class="col-md-12">
				<h5 class="mb-2">Other sensors data</h5>
				<div class="inner-tabledata">
					<div class="inner-row">
						<div>
							<h6>Mycoxin</h6>
							<p>12-08-2022</p>
						</div>
						<div>
							<span class="text-success"> 25%</span>
							<span class="fa fa-arrow-up"></span>
						</div>
					</div>
					<div class="inner-row">
						<div>
							<h6>HC Air Temperature</h6>
							<p>12-08-2022</p>
						</div>
						<div>
							<span class="text-danger"> 26.33 <sup>o</sup>C</span>
							<span class="fa fa-arrow-up"></span>
						</div>
					</div>
					<div class="inner-row">
						<div>
							<h6>HC Relative Humidity</h6>
							<p>12-08-2022</p>
						</div>
						<div>
							<span class="text-danger"> 99.12 %</span>
							<span class="fa fa-arrow-up"></span>
						</div>
					</div>
				</div>
			</div>
			
			
			
			
			
			
			
			  
			
		</div>
	</div>
</div>

     



	
     


<script src="js/vendor/modernizr-3.6.0.min.js"></script>
<script src="js/vendor/jquery-3.6.0.min.js"></script>
<script src="js/vendor/jquery-migrate-3.3.2.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery-ui.js"></script>
<script src="js/vendor/slick.js"></script>
<script src="js/vendor/jquery.easing.min.js"></script>
<script src="js/vendor/select2.full.min.js"></script>
<script src="js/jquery.sparkline.min.js"></script>
<script src="js/script.js"></script>
<!-- Resources -->
<script src="https://cdn.amcharts.com/lib/5/index.js"></script>
<script src="https://cdn.amcharts.com/lib/5/xy.js"></script>
<script src="https://cdn.amcharts.com/lib/5/themes/Animated.js"></script>

<!-- Chart code -->
<script>
am5.ready(function() {

// Create root element
// https://www.amcharts.com/docs/v5/getting-started/#Root_element
var root = am5.Root.new("chartdiv");

// Set themes
// https://www.amcharts.com/docs/v5/concepts/themes/
root.setThemes([am5themes_Animated.new(root)]);

function generateChartData() {
  var chartData = [];
  var firstDate = new Date();
  firstDate.setDate(firstDate.getDate() - 1000);
  firstDate.setHours(0, 0, 0, 0);
  var value = 100;
  for (var i = 0; i < 20; i++) {
    var newDate = new Date(firstDate);
    newDate.setDate(newDate.getDate() + i);

    value += Math.round((Math.random() < 0.5 ? 1 : -1) * Math.random() * 10);
    var open = value + Math.round(Math.random() * 16 - 8);
    var low = Math.min(value, open) - Math.round(Math.random() * 5);
    var high = Math.max(value, open) + Math.round(Math.random() * 5);

    chartData.push({
      date: newDate.getTime(),
      value: value,
      open: open,
      low: low,
      high: high
    });
  }
  return chartData;
}

var data = generateChartData();

// Create chart
// https://www.amcharts.com/docs/v5/charts/xy-chart/
var chart = root.container.children.push(
  am5xy.XYChart.new(root, {
    focusable: true,
    panX: true,
    panY: true,
    wheelX: "panX",
    wheelY: "zoomX"
  })
);

// Create axes
// https://www.amcharts.com/docs/v5/charts/xy-chart/axes/
var xAxis = chart.xAxes.push(
  am5xy.DateAxis.new(root, {
    groupData: true,
    maxDeviation:0.5,
    baseInterval: { timeUnit: "day", count: 1 },
    renderer: am5xy.AxisRendererX.new(root, {pan:"zoom"}),
    tooltip: am5.Tooltip.new(root, {})
  })
);

var yAxis = chart.yAxes.push(
  am5xy.ValueAxis.new(root, {
    maxDeviation:1,
    renderer: am5xy.AxisRendererY.new(root, {pan:"zoom"})
  })
);

var color = root.interfaceColors.get("background");

// Add series
// https://www.amcharts.com/docs/v5/charts/xy-chart/series/
var series = chart.series.push(
  am5xy.CandlestickSeries.new(root, {
    fill: color,
    calculateAggregates: true,
    stroke: color,
    name: "MDXI",
    xAxis: xAxis,
    yAxis: yAxis,
    valueYField: "value",
    openValueYField: "open",
    lowValueYField: "low",
    highValueYField: "high",
    valueXField: "date",
    lowValueYGrouped: "low",
    highValueYGrouped: "high",
    openValueYGrouped: "open",
    valueYGrouped: "close",
    legendValueText:
      "open: {openValueY} low: {lowValueY} high: {highValueY} close: {valueY}",
    legendRangeValueText: "{valueYClose}",
    tooltip: am5.Tooltip.new(root, {
      pointerOrientation: "horizontal",
      labelText: "open: {openValueY}\nlow: {lowValueY}\nhigh: {highValueY}\nclose: {valueY}"
    })
  })
);

// Add cursor
// https://www.amcharts.com/docs/v5/charts/xy-chart/cursor/
var cursor = chart.set(
  "cursor",
  am5xy.XYCursor.new(root, {
    xAxis: xAxis
  })
);
cursor.lineY.set("visible", false);

// Stack axes vertically
// https://www.amcharts.com/docs/v5/charts/xy-chart/axes/#Stacked_axes
chart.leftAxesContainer.set("layout", root.verticalLayout);

// Add scrollbar
// https://www.amcharts.com/docs/v5/charts/xy-chart/scrollbars/
var scrollbar = am5xy.XYChartScrollbar.new(root, {
  orientation: "horizontal",
  height: 50
});
chart.set("scrollbarX", scrollbar);

var sbxAxis = scrollbar.chart.xAxes.push(
  am5xy.DateAxis.new(root, {
    groupData: true,
    groupIntervals: [{ timeUnit: "week", count: 1 }],
    baseInterval: { timeUnit: "day", count: 1 },
    renderer: am5xy.AxisRendererX.new(root, {
      opposite: false,
      strokeOpacity: 0
    })
  })
);

var sbyAxis = scrollbar.chart.yAxes.push(
  am5xy.ValueAxis.new(root, {
    renderer: am5xy.AxisRendererY.new(root, {})
  })
);

var sbseries = scrollbar.chart.series.push(
  am5xy.LineSeries.new(root, {
    xAxis: sbxAxis,
    yAxis: sbyAxis,
    valueYField: "value",
    valueXField: "date"
  })
);

// Add legend
// https://www.amcharts.com/docs/v5/charts/xy-chart/legend-xy-series/
var legend = yAxis.axisHeader.children.push(am5.Legend.new(root, {}));

legend.data.push(series);

legend.markers.template.setAll({
  width: 10
});

legend.markerRectangles.template.setAll({
  cornerRadiusTR: 0,
  cornerRadiusBR: 0,
  cornerRadiusTL: 0,
  cornerRadiusBL: 0
});

// set data
series.data.setAll(data);
sbseries.data.setAll(data);

// Make stuff animate on load
// https://www.amcharts.com/docs/v5/concepts/animations/
series.appear(1000);
chart.appear(1000, 100);

}); // end am5.ready()
</script>
</body>
</html>