JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://jp.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://jp.igniteui.com/js-data/wind"></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>
<link href="https://cdn-na.infragistics.com/igniteui/latest/css/structure/modules/infragistics.ui.chart.css" rel="stylesheet"></link>
<script src="https://cdn-na.infragistics.com/igniteui/latest/js/i18n/infragistics-ja.js"></script>
<div id="chart"></div>
<div class="NOAAdata-attribution">
天気のデータ ソース:<br />
<a href="http://www.noaa.gov/" target="_blank">NOAA</a>
</div>
CSS
/* Use the following css classes to apply gradients through CSS for the series fill */
/* As many palettes can be defined as needed */
/*.ui-chart-fill-palette-1 {
background-image: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
}
.ui-chart-fill-palette-2 {
background-image: linear-gradient(to right, violet, indigo,blue, green, yellow, orange, red);
}*/
/*Use the following css classes to apply gradients through CSS for the series fill*/
/*.ui-chart-outline-palette-1 {
background-image: linear-gradient(90deg, green 10%, blue 80%);
}
.ui-chart-outline-palette-2 {
background-image: linear-gradient(180deg, red 30%, blue 50%);
}*/
JavaScript
$(function () {
$("#chart").igDataChart({
width: "100%",
height: "400px",
dataSource: data,
title: "ロサンゼルスの風データ (12 時間)",
horizontalZoomable: true,
verticalZoomable: true,
windowResponse: "immediate",
axes: [{
name: "xAxis",
type: "categoryX",
label: "Time"
},
{
name: "yAxis",
type: "numericY",
maximumValue: 10,
title: "風速 (mph)",
}],
series: [{
brush: {
type: "linearGradient",
colorStops: [{
color: "#2788B1",
offset: 0
},
{
color: "#A4BA29",
offset: 0.3
},
{
color: "#FDBD48",
offset: .6
},
{
color: "#D3404B",
offset: .9
}],
// optional:
startPoint: { x: 0, y: 1 },
endPoint: { x: 0, y: 0 }
// if start/endPoint are not specified, the default direction is top-bottom
},
outline: {
type: "linearGradient",
colorStops: [{
color: "#2788B1",
offset: 0
},
{
color: "#A4BA29",
offset: 0.3
},
...