Wijmo ユーザーガイド > ウィジェット > Chart ウィジェット > BubbleChart > 操作手順 > 近似曲線の追加 |
「クイックスタート」」の例を基に、seriesList オプションの各属性を使用して、チャートに近似曲線を追加できます。
スクリプト |
コードのコピー |
---|---|
<script id="scriptInit" type="text/javascript"> var data = [{ Income: 7931, LifeExpectancy: 73, Population: 1340 }, { Income: 2972, LifeExpectancy: 65, Population: 1150 }, { Income: 42066, LifeExpectancy: 78, Population: 309 }, { Income: 30866, LifeExpectancy: 83, Population: 126 }, { Income: 14318, LifeExpectancy: 69, Population: 140 }, { Income: 374, LifeExpectancy: 48, Population: 72 }, { Income: 9284, LifeExpectancy: 52, Population: 43 }, { Income: 11754, LifeExpectancy: 77, Population: 112 }, { Income: 31217, LifeExpectancy: 80, Population: 61 }]; require(["wijmo.wijbubblechart"], function () { $(document).ready(function () { $("#wijbubblechart").wijbubblechart({ dataSource: data, legend: {visible: false}, seriesList: [{ data: { x: {bind: "Income"}, y: {bind: "LifeExpectancy"}, y1: {bind: "Population"} } },{ isTrendline: true, order: 4, label: "Trend", data: { x: {bind: "Income"}, y: {bind: "LifeExpectancy"}, } } ] }); }); }); </script> |