var chart = new CanvasJS.Chart("chartContainer",
{
\t title: {
\t \t text: "Scatter Chart with Different Marker Types"
\t },
\t legend: {
\t \t horizontalAlign: "right",
\t \t verticalAlign: "center"
\t },
\t data: [
\t {
\t \t type: "scatter",
\t \t showInLegend: true,
\t \t legendText: "Circle",
\t \t dataPoints: [
\t \t \t { x: 1, y: 91, markerSize: 10 },
\t \t \t { x: 2, y: 75, markerSize: 20 },
\t \t \t { x: 3, y: 70, markerSize: 30 },
\t \t \t { x: 4, y: 85, markerSize: 40 },
\t \t \t { x: 5, y: 75, markerSize: 50 } \t \t \t
\t \t ]
\t },
\t {
\t \t type: "scatter",
\t \t markerType: "square", //default "circle"
\t \t showInLegend: true,
\t \t legendText: "Square",
\t \t dataPoints: [
\t \t \t { x: 1, y: 71, markerSize: 10 },
\t \t \t { x: 2, y: 55, markerSize: 20 },
\t \t \t { x: 3, y: 50, markerSize: 30 },
\t \t \t { x: 4, y: 65, markerSize: 40 },
\t \t \t { x: 5, y: 55, markerSize: 50 } \t \t \t
\t \t ]
\t },
\t {
\t \t type: "scatter",
\t \t markerType: "triangle",
\t \t showInLegend: true,
\t \t legendText: "Triangle",
\t \t dataPoints: [
\t \t \t { x: 1, y: 51, markerSize: 10 },
\t \t \t { x: 2, y: 35, markerSize: 20 },
\t \t \t { x: 3, y: 30, markerSize: 30 },
\t \t \t { x: 4, y: 45, markerSize: 40 },
\t \t \t { x: 5, y: 35, markerSize: 50 }
\t \t ]
\t },
\t {
\t \t type: "scatter",
\t \t markerType: "cross",
\t \t showInLegend: true,
\t \t legendText: "Cross",
\t \t dataPoints: [
\t \t \t { x: 1, y: 31, markerSize: 10 },
\t \t \t { x: 2, y: 15, markerSize: 20 },
\t \t \t { x: 3, y: 10, markerSize: 30 },
\t \t \t { x: 4, y: 25, markerSize: 40 },
\t \t \t { x: 5, y: 15, markerSize: 50 }
\t \t ]
\t }
\t ]
});
chart.render();
<script src="http://canvasjs.com/assets/script/canvasjs.min.js"></script>
<div id="chartContainer" style="height: 300px; width: 100%;"></div>
누구도 날 downvoting의 이유를 말해 관심? – user7117436
아마 라이브러리와 특정 문제가있는 코드를 묻는 것 때문에. –
@MaximilianPeters 나는 몰라. 분명히 이것은 코드 관련 질문이 아닙니다. 나는 "JavaScript 스택 교환"을 봤는데이 사이트는 첫 번째 검색 결과입니다. 그래서 여기 내가 물었다. Thx는 대답하고 있습니다. – user7117436