简体   繁体   中英

Arched square chart using high charts

I have a need to create Arched square chart using High Charts . However I could not find any appropriate forum which depicts this.

The requirement is as follows – Considering X, Y is 0,0 at bottom left –

  1. Crate a straight vertical line between points (100,150) and (100,110).
  2. Create an Ellipse from point (100,110) to (150,80)
  3. Create an ellipse from (150,80) to (200,110)
  4. Crate a straight vertical line between points (200,110) and (200,150).

The closest I could go is in below (Scroll the page completely to see the output) but,

  1. I want to use high chart features
  2. The ellipse is not an actual ellipse but a semi circle which would not consider points 150,80 as a common junction for 2 ellipse.

You can assume anything that is missing for illustration purpose.

http://plnkr.co/edit/WoW3fl1VRH9cZAAjNoET?p=preview

The solution is to use closed path with A params like this :

<html>
<head>
<script data-require="jquery@*" data-semver="2.1.4" src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<link rel="stylesheet" href="style.css" />
<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="script.js"></script>
</head>

<body>
<h1>Hello Plunker!</h1>
<div id="container" style="height: 300px">
<!--
<svg height="400" width="450">
<path d="M 100 350 q 150 -300 300 0" stroke="blue" stroke-width="0.5" fill="none" />
</svg>
-->
<button id="button">Toggle group</button>
</div>
</body>

</html>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM