• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    9. <style>
    10. html,
    11. body {
    12. height: 100%;
    13. width: 100%;
    14. margin: 0;
    15. padding: 0;
    16. }
    17.  
    18. #myChart {
    19. height: 100%;
    20. width: 100%;
    21. min-height: 150px;
    22. }
    23.  
    24. .zc-ref {
    25. display: none;
    26. }
    27. </style>
    28. </head>
    29.  
    30. <body>
    31. <div id="zc"></div>
    32. <script>
    33. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    34. var flowers = {
    35. "traits": ["sepalLength", "sepalWidth", "petalLength", "petalWidth"],
    36. "species": ["setosa", "versicolor", "virginica"],
    37. "values": [{
    38. "sepalLength": 5.1,
    39. "sepalWidth": 3.5,
    40. "petalLength": 1.4,
    41. "petalWidth": 0.2,
    42. "species": "setosa"
    43. },
    44. {
    45. "sepalLength": 4.9,
    46. "sepalWidth": 3.0,
    47. "petalLength": 1.4,
    48. "petalWidth": 0.2,
    49. "species": "setosa"
    50. },
    51. {
    52. "sepalLength": 4.7,
    53. "sepalWidth": 3.2,
    54. "petalLength": 1.3,
    55. "petalWidth": 0.2,
    56. "species": "setosa"
    57. },
    58. {
    59. "sepalLength": 4.6,
    60. "sepalWidth": 3.1,
    61. "petalLength": 1.5,
    62. "petalWidth": 0.2,
    63. "species": "setosa"
    64. },
    65. {
    66. "sepalLength": 5.0,
    67. "sepalWidth": 3.6,
    68. "petalLength": 1.4,
    69. "petalWidth": 0.2,
    70. "species": "setosa"
    71. },
    72. {
    73. "sepalLength": 5.4,
    74. "sepalWidth": 3.9,
    75. "petalLength": 1.7,
    76. "petalWidth": 0.4,
    77. "species": "setosa"
    78. },
    79. {
    80. "sepalLength": 4.6,
    81. "sepalWidth": 3.4,
    82. "petalLength": 1.4,
    83. "petalWidth": 0.3,
    84. "species": "setosa"
    85. },
    86. {
    87. "sepalLength": 5.0,
    88. "sepalWidth": 3.4,
    89. "petalLength": 1.5,
    90. "petalWidth": 0.2,
    91. "species": "setosa"
    92. },
    93. {
    94. "sepalLength": 4.4,
    95. "sepalWidth": 2.9,
    96. "petalLength": 1.4,
    97. "petalWidth": 0.2,
    98. "species": "setosa"
    99. },
    100. {
    101. "sepalLength": 4.9,
    102. "sepalWidth": 3.1,
    103. "petalLength": 1.5,
    104. "petalWidth": 0.1,
    105. "species": "setosa"
    106. },
    107. {
    108. "sepalLength": 5.4,
    109. "sepalWidth": 3.7,
    110. "petalLength": 1.5,
    111. "petalWidth": 0.2,
    112. "species": "setosa"
    113. },
    114. {
    115. "sepalLength": 4.8,
    116. "sepalWidth": 3.4,
    117. "petalLength": 1.6,
    118. "petalWidth": 0.2,
    119. "species": "setosa"
    120. },
    121. {
    122. "sepalLength": 4.8,
    123. "sepalWidth": 3.0,
    124. "petalLength": 1.4,
    125. "petalWidth": 0.1,
    126. "species": "setosa"
    127. },
    128. {
    129. "sepalLength": 4.3,
    130. "sepalWidth": 3.0,
    131. "petalLength": 1.1,
    132. "petalWidth": 0.1,
    133. "species": "setosa"
    134. },
    135. {
    136. "sepalLength": 5.8,
    137. "sepalWidth": 4.0,
    138. "petalLength": 1.2,
    139. "petalWidth": 0.2,
    140. "species": "setosa"
    141. },
    142. {
    143. "sepalLength": 5.7,
    144. "sepalWidth": 4.4,
    145. "petalLength": 1.5,
    146. "petalWidth": 0.4,
    147. "species": "setosa"
    148. },
    149. {
    150. "sepalLength": 5.4,
    151. "sepalWidth": 3.9,
    152. "petalLength": 1.3,
    153. "petalWidth": 0.4,
    154. "species": "setosa"
    155. },
    156. {
    157. "sepalLength": 5.1,
    158. "sepalWidth": 3.5,
    159. "petalLength": 1.4,
    160. "petalWidth": 0.3,
    161. "species": "setosa"
    162. },
    163. {
    164. "sepalLength": 5.7,
    165. "sepalWidth": 3.8,
    166. "petalLength": 1.7,
    167. "petalWidth": 0.3,
    168. "species": "setosa"
    169. },
    170. {
    171. "sepalLength": 5.1,
    172. "sepalWidth": 3.8,
    173. "petalLength": 1.5,
    174. "petalWidth": 0.3,
    175. "species": "setosa"
    176. },
    177. {
    178. "sepalLength": 5.4,
    179. "sepalWidth": 3.4,
    180. "petalLength": 1.7,
    181. "petalWidth": 0.2,
    182. "species": "setosa"
    183. },
    184. {
    185. "sepalLength": 5.1,
    186. "sepalWidth": 3.7,
    187. "petalLength": 1.5,
    188. "petalWidth": 0.4,
    189. "species": "setosa"
    190. },
    191. {
    192. "sepalLength": 4.6,
    193. "sepalWidth": 3.6,
    194. "petalLength": 1.0,
    195. "petalWidth": 0.2,
    196. "species": "setosa"
    197. },
    198. {
    199. "sepalLength": 5.1,
    200. "sepalWidth": 3.3,
    201. "petalLength": 1.7,
    202. "petalWidth": 0.5,
    203. "species": "setosa"
    204. },
    205. {
    206. "sepalLength": 4.8,
    207. "sepalWidth": 3.4,
    208. "petalLength": 1.9,
    209. "petalWidth": 0.2,
    210. "species": "setosa"
    211. },
    212. {
    213. "sepalLength": 5.0,
    214. "sepalWidth": 3.0,
    215. "petalLength": 1.6,
    216. "petalWidth": 0.2,
    217. "species": "setosa"
    218. },
    219. {
    220. "sepalLength": 5.0,
    221. "sepalWidth": 3.4,
    222. "petalLength": 1.6,
    223. "petalWidth": 0.4,
    224. "species": "setosa"
    225. },
    226. {
    227. "sepalLength": 5.2,
    228. "sepalWidth": 3.5,
    229. "petalLength": 1.5,
    230. "petalWidth": 0.2,
    231. "species": "setosa"
    232. },
    233. {
    234. "sepalLength": 5.2,
    235. "sepalWidth": 3.4,
    236. "petalLength": 1.4,
    237. "petalWidth": 0.2,
    238. "species": "setosa"
    239. },
    240. {
    241. "sepalLength": 4.7,
    242. "sepalWidth": 3.2,
    243. "petalLength": 1.6,
    244. "petalWidth": 0.2,
    245. "species": "setosa"
    246. },
    247. {
    248. "sepalLength": 4.8,
    249. "sepalWidth": 3.1,
    250. "petalLength": 1.6,
    251. "petalWidth": 0.2,
    252. "species": "setosa"
    253. },
    254. {
    255. "sepalLength": 5.4,
    256. "sepalWidth": 3.4,
    257. "petalLength": 1.5,
    258. "petalWidth": 0.4,
    259. "species": "setosa"
    260. },
    261. {
    262. "sepalLength": 5.2,
    263. "sepalWidth": 4.1,
    264. "petalLength": 1.5,
    265. "petalWidth": 0.1,
    266. "species": "setosa"
    267. },
    268. {
    269. "sepalLength": 5.5,
    270. "sepalWidth": 4.2,
    271. "petalLength": 1.4,
    272. "petalWidth": 0.2,
    273. "species": "setosa"
    274. },
    275. {
    276. "sepalLength": 4.9,
    277. "sepalWidth": 3.1,
    278. "petalLength": 1.5,
    279. "petalWidth": 0.2,
    280. "species": "setosa"
    281. },
    282. {
    283. "sepalLength": 5.0,
    284. "sepalWidth": 3.2,
    285. "petalLength": 1.2,
    286. "petalWidth": 0.2,
    287. "species": "setosa"
    288. },
    289. {
    290. "sepalLength": 5.5,
    291. "sepalWidth": 3.5,
    292. "petalLength": 1.3,
    293. "petalWidth": 0.2,
    294. "species": "setosa"
    295. },
    296. {
    297. "sepalLength": 4.9,
    298. "sepalWidth": 3.6,
    299. "petalLength": 1.4,
    300. "petalWidth": 0.1,
    301. "species": "setosa"
    302. },
    303. {
    304. "sepalLength": 4.4,
    305. "sepalWidth": 3.0,
    306. "petalLength": 1.3,
    307. "petalWidth": 0.2,
    308. "species": "setosa"
    309. },
    310. {
    311. "sepalLength": 5.1,
    312. "sepalWidth": 3.4,
    313. "petalLength": 1.5,
    314. "petalWidth": 0.2,
    315. "species": "setosa"
    316. },
    317. {
    318. "sepalLength": 5.0,
    319. "sepalWidth": 3.5,
    320. "petalLength": 1.3,
    321. "petalWidth": 0.3,
    322. "species": "setosa"
    323. },
    324. {
    325. "sepalLength": 4.5,
    326. "sepalWidth": 2.3,
    327. "petalLength": 1.3,
    328. "petalWidth": 0.3,
    329. "species": "setosa"
    330. },
    331. {
    332. "sepalLength": 4.4,
    333. "sepalWidth": 3.2,
    334. "petalLength": 1.3,
    335. "petalWidth": 0.2,
    336. "species": "setosa"
    337. },
    338. {
    339. "sepalLength": 5.0,
    340. "sepalWidth": 3.5,
    341. "petalLength": 1.6,
    342. "petalWidth": 0.6,
    343. "species": "setosa"
    344. },
    345. {
    346. "sepalLength": 5.1,
    347. "sepalWidth": 3.8,
    348. "petalLength": 1.9,
    349. "petalWidth": 0.4,
    350. "species": "setosa"
    351. },
    352. {
    353. "sepalLength": 4.8,
    354. "sepalWidth": 3.0,
    355. "petalLength": 1.4,
    356. "petalWidth": 0.3,
    357. "species": "setosa"
    358. },
    359. {
    360. "sepalLength": 5.1,
    361. "sepalWidth": 3.8,
    362. "petalLength": 1.6,
    363. "petalWidth": 0.2,
    364. "species": "setosa"
    365. },
    366. {
    367. "sepalLength": 4.6,
    368. "sepalWidth": 3.2,
    369. "petalLength": 1.4,
    370. "petalWidth": 0.2,
    371. "species": "setosa"
    372. },
    373. {
    374. "sepalLength": 5.3,
    375. "sepalWidth": 3.7,
    376. "petalLength": 1.5,
    377. "petalWidth": 0.2,
    378. "species": "setosa"
    379. },
    380. {
    381. "sepalLength": 5.0,
    382. "sepalWidth": 3.3,
    383. "petalLength": 1.4,
    384. "petalWidth": 0.2,
    385. "species": "setosa"
    386. },
    387. {
    388. "sepalLength": 7.0,
    389. "sepalWidth": 3.2,
    390. "petalLength": 4.7,
    391. "petalWidth": 1.4,
    392. "species": "versicolor"
    393. },
    394. {
    395. "sepalLength": 6.4,
    396. "sepalWidth": 3.2,
    397. "petalLength": 4.5,
    398. "petalWidth": 1.5,
    399. "species": "versicolor"
    400. },
    401. {
    402. "sepalLength": 6.9,
    403. "sepalWidth": 3.1,
    404. "petalLength": 4.9,
    405. "petalWidth": 1.5,
    406. "species": "versicolor"
    407. },
    408. {
    409. "sepalLength": 5.5,
    410. "sepalWidth": 2.3,
    411. "petalLength": 4.0,
    412. "petalWidth": 1.3,
    413. "species": "versicolor"
    414. },
    415. {
    416. "sepalLength": 6.5,
    417. "sepalWidth": 2.8,
    418. "petalLength": 4.6,
    419. "petalWidth": 1.5,
    420. "species": "versicolor"
    421. },
    422. {
    423. "sepalLength": 5.7,
    424. "sepalWidth": 2.8,
    425. "petalLength": 4.5,
    426. "petalWidth": 1.3,
    427. "species": "versicolor"
    428. },
    429. {
    430. "sepalLength": 6.3,
    431. "sepalWidth": 3.3,
    432. "petalLength": 4.7,
    433. "petalWidth": 1.6,
    434. "species": "versicolor"
    435. },
    436. {
    437. "sepalLength": 4.9,
    438. "sepalWidth": 2.4,
    439. "petalLength": 3.3,
    440. "petalWidth": 1.0,
    441. "species": "versicolor"
    442. },
    443. {
    444. "sepalLength": 6.6,
    445. "sepalWidth": 2.9,
    446. "petalLength": 4.6,
    447. "petalWidth": 1.3,
    448. "species": "versicolor"
    449. },
    450. {
    451. "sepalLength": 5.2,
    452. "sepalWidth": 2.7,
    453. "petalLength": 3.9,
    454. "petalWidth": 1.4,
    455. "species": "versicolor"
    456. },
    457. {
    458. "sepalLength": 5.0,
    459. "sepalWidth": 2.0,
    460. "petalLength": 3.5,
    461. "petalWidth": 1.0,
    462. "species": "versicolor"
    463. },
    464. {
    465. "sepalLength": 5.9,
    466. "sepalWidth": 3.0,
    467. "petalLength": 4.2,
    468. "petalWidth": 1.5,
    469. "species": "versicolor"
    470. },
    471. {
    472. "sepalLength": 6.0,
    473. "sepalWidth": 2.2,
    474. "petalLength": 4.0,
    475. "petalWidth": 1.0,
    476. "species": "versicolor"
    477. },
    478. {
    479. "sepalLength": 6.1,
    480. "sepalWidth": 2.9,
    481. "petalLength": 4.7,
    482. "petalWidth": 1.4,
    483. "species": "versicolor"
    484. },
    485. {
    486. "sepalLength": 5.6,
    487. "sepalWidth": 2.9,
    488. "petalLength": 3.6,
    489. "petalWidth": 1.3,
    490. "species": "versicolor"
    491. },
    492. {
    493. "sepalLength": 6.7,
    494. "sepalWidth": 3.1,
    495. "petalLength": 4.4,
    496. "petalWidth": 1.4,
    497. "species": "versicolor"
    498. },
    499. {
    500. "sepalLength": 5.6,
    501. "sepalWidth": 3.0,
    502. "petalLength": 4.5,
    503. "petalWidth": 1.5,
    504. "species": "versicolor"
    505. },
    506. {
    507. "sepalLength": 5.8,
    508. "sepalWidth": 2.7,
    509. "petalLength": 4.1,
    510. "petalWidth": 1.0,
    511. "species": "versicolor"
    512. },
    513. {
    514. "sepalLength": 6.2,
    515. "sepalWidth": 2.2,
    516. "petalLength": 4.5,
    517. "petalWidth": 1.5,
    518. "species": "versicolor"
    519. },
    520. {
    521. "sepalLength": 5.6,
    522. "sepalWidth": 2.5,
    523. "petalLength": 3.9,
    524. "petalWidth": 1.1,
    525. "species": "versicolor"
    526. },
    527. {
    528. "sepalLength": 5.9,
    529. "sepalWidth": 3.2,
    530. "petalLength": 4.8,
    531. "petalWidth": 1.8,
    532. "species": "versicolor"
    533. },
    534. {
    535. "sepalLength": 6.1,
    536. "sepalWidth": 2.8,
    537. "petalLength": 4.0,
    538. "petalWidth": 1.3,
    539. "species": "versicolor"
    540. },
    541. {
    542. "sepalLength": 6.3,
    543. "sepalWidth": 2.5,
    544. "petalLength": 4.9,
    545. "petalWidth": 1.5,
    546. "species": "versicolor"
    547. },
    548. {
    549. "sepalLength": 6.1,
    550. "sepalWidth": 2.8,
    551. "petalLength": 4.7,
    552. "petalWidth": 1.2,
    553. "species": "versicolor"
    554. },
    555. {
    556. "sepalLength": 6.4,
    557. "sepalWidth": 2.9,
    558. "petalLength": 4.3,
    559. "petalWidth": 1.3,
    560. "species": "versicolor"
    561. },
    562. {
    563. "sepalLength": 6.6,
    564. "sepalWidth": 3.0,
    565. "petalLength": 4.4,
    566. "petalWidth": 1.4,
    567. "species": "versicolor"
    568. },
    569. {
    570. "sepalLength": 6.8,
    571. "sepalWidth": 2.8,
    572. "petalLength": 4.8,
    573. "petalWidth": 1.4,
    574. "species": "versicolor"
    575. },
    576. {
    577. "sepalLength": 6.7,
    578. "sepalWidth": 3.0,
    579. "petalLength": 5.0,
    580. "petalWidth": 1.7,
    581. "species": "versicolor"
    582. },
    583. {
    584. "sepalLength": 6.0,
    585. "sepalWidth": 2.9,
    586. "petalLength": 4.5,
    587. "petalWidth": 1.5,
    588. "species": "versicolor"
    589. },
    590. {
    591. "sepalLength": 5.7,
    592. "sepalWidth": 2.6,
    593. "petalLength": 3.5,
    594. "petalWidth": 1.0,
    595. "species": "versicolor"
    596. },
    597. {
    598. "sepalLength": 5.5,
    599. "sepalWidth": 2.4,
    600. "petalLength": 3.8,
    601. "petalWidth": 1.1,
    602. "species": "versicolor"
    603. },
    604. {
    605. "sepalLength": 5.5,
    606. "sepalWidth": 2.4,
    607. "petalLength": 3.7,
    608. "petalWidth": 1.0,
    609. "species": "versicolor"
    610. },
    611. {
    612. "sepalLength": 5.8,
    613. "sepalWidth": 2.7,
    614. "petalLength": 3.9,
    615. "petalWidth": 1.2,
    616. "species": "versicolor"
    617. },
    618. {
    619. "sepalLength": 6.0,
    620. "sepalWidth": 2.7,
    621. "petalLength": 5.1,
    622. "petalWidth": 1.6,
    623. "species": "versicolor"
    624. },
    625. {
    626. "sepalLength": 5.4,
    627. "sepalWidth": 3.0,
    628. "petalLength": 4.5,
    629. "petalWidth": 1.5,
    630. "species": "versicolor"
    631. },
    632. {
    633. "sepalLength": 6.0,
    634. "sepalWidth": 3.4,
    635. "petalLength": 4.5,
    636. "petalWidth": 1.6,
    637. "species": "versicolor"
    638. },
    639. {
    640. "sepalLength": 6.7,
    641. "sepalWidth": 3.1,
    642. "petalLength": 4.7,
    643. "petalWidth": 1.5,
    644. "species": "versicolor"
    645. },
    646. {
    647. "sepalLength": 6.3,
    648. "sepalWidth": 2.3,
    649. "petalLength": 4.4,
    650. "petalWidth": 1.3,
    651. "species": "versicolor"
    652. },
    653. {
    654. "sepalLength": 5.6,
    655. "sepalWidth": 3.0,
    656. "petalLength": 4.1,
    657. "petalWidth": 1.3,
    658. "species": "versicolor"
    659. },
    660. {
    661. "sepalLength": 5.5,
    662. "sepalWidth": 2.5,
    663. "petalLength": 4.0,
    664. "petalWidth": 1.3,
    665. "species": "versicolor"
    666. },
    667. {
    668. "sepalLength": 5.5,
    669. "sepalWidth": 2.6,
    670. "petalLength": 4.4,
    671. "petalWidth": 1.2,
    672. "species": "versicolor"
    673. },
    674. {
    675. "sepalLength": 6.1,
    676. "sepalWidth": 3.0,
    677. "petalLength": 4.6,
    678. "petalWidth": 1.4,
    679. "species": "versicolor"
    680. },
    681. {
    682. "sepalLength": 5.8,
    683. "sepalWidth": 2.6,
    684. "petalLength": 4.0,
    685. "petalWidth": 1.2,
    686. "species": "versicolor"
    687. },
    688. {
    689. "sepalLength": 5.0,
    690. "sepalWidth": 2.3,
    691. "petalLength": 3.3,
    692. "petalWidth": 1.0,
    693. "species": "versicolor"
    694. },
    695. {
    696. "sepalLength": 5.6,
    697. "sepalWidth": 2.7,
    698. "petalLength": 4.2,
    699. "petalWidth": 1.3,
    700. "species": "versicolor"
    701. },
    702. {
    703. "sepalLength": 5.7,
    704. "sepalWidth": 3.0,
    705. "petalLength": 4.2,
    706. "petalWidth": 1.2,
    707. "species": "versicolor"
    708. },
    709. {
    710. "sepalLength": 5.7,
    711. "sepalWidth": 2.9,
    712. "petalLength": 4.2,
    713. "petalWidth": 1.3,
    714. "species": "versicolor"
    715. },
    716. {
    717. "sepalLength": 6.2,
    718. "sepalWidth": 2.9,
    719. "petalLength": 4.3,
    720. "petalWidth": 1.3,
    721. "species": "versicolor"
    722. },
    723. {
    724. "sepalLength": 5.1,
    725. "sepalWidth": 2.5,
    726. "petalLength": 3.0,
    727. "petalWidth": 1.1,
    728. "species": "versicolor"
    729. },
    730. {
    731. "sepalLength": 5.7,
    732. "sepalWidth": 2.8,
    733. "petalLength": 4.1,
    734. "petalWidth": 1.3,
    735. "species": "versicolor"
    736. },
    737. {
    738. "sepalLength": 6.3,
    739. "sepalWidth": 3.3,
    740. "petalLength": 6.0,
    741. "petalWidth": 2.5,
    742. "species": "virginica"
    743. },
    744. {
    745. "sepalLength": 5.8,
    746. "sepalWidth": 2.7,
    747. "petalLength": 5.1,
    748. "petalWidth": 1.9,
    749. "species": "virginica"
    750. },
    751. {
    752. "sepalLength": 7.1,
    753. "sepalWidth": 3.0,
    754. "petalLength": 5.9,
    755. "petalWidth": 2.1,
    756. "species": "virginica"
    757. },
    758. {
    759. "sepalLength": 6.3,
    760. "sepalWidth": 2.9,
    761. "petalLength": 5.6,
    762. "petalWidth": 1.8,
    763. "species": "virginica"
    764. },
    765. {
    766. "sepalLength": 6.5,
    767. "sepalWidth": 3.0,
    768. "petalLength": 5.8,
    769. "petalWidth": 2.2,
    770. "species": "virginica"
    771. },
    772. {
    773. "sepalLength": 7.6,
    774. "sepalWidth": 3.0,
    775. "petalLength": 6.6,
    776. "petalWidth": 2.1,
    777. "species": "virginica"
    778. },
    779. {
    780. "sepalLength": 4.9,
    781. "sepalWidth": 2.5,
    782. "petalLength": 4.5,
    783. "petalWidth": 1.7,
    784. "species": "virginica"
    785. },
    786. {
    787. "sepalLength": 7.3,
    788. "sepalWidth": 2.9,
    789. "petalLength": 6.3,
    790. "petalWidth": 1.8,
    791. "species": "virginica"
    792. },
    793. {
    794. "sepalLength": 6.7,
    795. "sepalWidth": 2.5,
    796. "petalLength": 5.8,
    797. "petalWidth": 1.8,
    798. "species": "virginica"
    799. },
    800. {
    801. "sepalLength": 7.2,
    802. "sepalWidth": 3.6,
    803. "petalLength": 6.1,
    804. "petalWidth": 2.5,
    805. "species": "virginica"
    806. },
    807. {
    808. "sepalLength": 6.5,
    809. "sepalWidth": 3.2,
    810. "petalLength": 5.1,
    811. "petalWidth": 2.0,
    812. "species": "virginica"
    813. },
    814. {
    815. "sepalLength": 6.4,
    816. "sepalWidth": 2.7,
    817. "petalLength": 5.3,
    818. "petalWidth": 1.9,
    819. "species": "virginica"
    820. },
    821. {
    822. "sepalLength": 6.8,
    823. "sepalWidth": 3.0,
    824. "petalLength": 5.5,
    825. "petalWidth": 2.1,
    826. "species": "virginica"
    827. },
    828. {
    829. "sepalLength": 5.7,
    830. "sepalWidth": 2.5,
    831. "petalLength": 5.0,
    832. "petalWidth": 2.0,
    833. "species": "virginica"
    834. },
    835. {
    836. "sepalLength": 5.8,
    837. "sepalWidth": 2.8,
    838. "petalLength": 5.1,
    839. "petalWidth": 2.4,
    840. "species": "virginica"
    841. },
    842. {
    843. "sepalLength": 6.4,
    844. "sepalWidth": 3.2,
    845. "petalLength": 5.3,
    846. "petalWidth": 2.3,
    847. "species": "virginica"
    848. },
    849. {
    850. "sepalLength": 6.5,
    851. "sepalWidth": 3.0,
    852. "petalLength": 5.5,
    853. "petalWidth": 1.8,
    854. "species": "virginica"
    855. },
    856. {
    857. "sepalLength": 7.7,
    858. "sepalWidth": 3.8,
    859. "petalLength": 6.7,
    860. "petalWidth": 2.2,
    861. "species": "virginica"
    862. },
    863. {
    864. "sepalLength": 7.7,
    865. "sepalWidth": 2.6,
    866. "petalLength": 6.9,
    867. "petalWidth": 2.3,
    868. "species": "virginica"
    869. },
    870. {
    871. "sepalLength": 6.0,
    872. "sepalWidth": 2.2,
    873. "petalLength": 5.0,
    874. "petalWidth": 1.5,
    875. "species": "virginica"
    876. },
    877. {
    878. "sepalLength": 6.9,
    879. "sepalWidth": 3.2,
    880. "petalLength": 5.7,
    881. "petalWidth": 2.3,
    882. "species": "virginica"
    883. },
    884. {
    885. "sepalLength": 5.6,
    886. "sepalWidth": 2.8,
    887. "petalLength": 4.9,
    888. "petalWidth": 2.0,
    889. "species": "virginica"
    890. },
    891. {
    892. "sepalLength": 7.7,
    893. "sepalWidth": 2.8,
    894. "petalLength": 6.7,
    895. "petalWidth": 2.0,
    896. "species": "virginica"
    897. },
    898. {
    899. "sepalLength": 6.3,
    900. "sepalWidth": 2.7,
    901. "petalLength": 4.9,
    902. "petalWidth": 1.8,
    903. "species": "virginica"
    904. },
    905. {
    906. "sepalLength": 6.7,
    907. "sepalWidth": 3.3,
    908. "petalLength": 5.7,
    909. "petalWidth": 2.1,
    910. "species": "virginica"
    911. },
    912. {
    913. "sepalLength": 7.2,
    914. "sepalWidth": 3.2,
    915. "petalLength": 6.0,
    916. "petalWidth": 1.8,
    917. "species": "virginica"
    918. },
    919. {
    920. "sepalLength": 6.2,
    921. "sepalWidth": 2.8,
    922. "petalLength": 4.8,
    923. "petalWidth": 1.8,
    924. "species": "virginica"
    925. },
    926. {
    927. "sepalLength": 6.1,
    928. "sepalWidth": 3.0,
    929. "petalLength": 4.9,
    930. "petalWidth": 1.8,
    931. "species": "virginica"
    932. },
    933. {
    934. "sepalLength": 6.4,
    935. "sepalWidth": 2.8,
    936. "petalLength": 5.6,
    937. "petalWidth": 2.1,
    938. "species": "virginica"
    939. },
    940. {
    941. "sepalLength": 7.2,
    942. "sepalWidth": 3.0,
    943. "petalLength": 5.8,
    944. "petalWidth": 1.6,
    945. "species": "virginica"
    946. },
    947. {
    948. "sepalLength": 7.4,
    949. "sepalWidth": 2.8,
    950. "petalLength": 6.1,
    951. "petalWidth": 1.9,
    952. "species": "virginica"
    953. },
    954. {
    955. "sepalLength": 7.9,
    956. "sepalWidth": 3.8,
    957. "petalLength": 6.4,
    958. "petalWidth": 2.0,
    959. "species": "virginica"
    960. },
    961. {
    962. "sepalLength": 6.4,
    963. "sepalWidth": 2.8,
    964. "petalLength": 5.6,
    965. "petalWidth": 2.2,
    966. "species": "virginica"
    967. },
    968. {
    969. "sepalLength": 6.3,
    970. "sepalWidth": 2.8,
    971. "petalLength": 5.1,
    972. "petalWidth": 1.5,
    973. "species": "virginica"
    974. },
    975. {
    976. "sepalLength": 6.1,
    977. "sepalWidth": 2.6,
    978. "petalLength": 5.6,
    979. "petalWidth": 1.4,
    980. "species": "virginica"
    981. },
    982. {
    983. "sepalLength": 7.7,
    984. "sepalWidth": 3.0,
    985. "petalLength": 6.1,
    986. "petalWidth": 2.3,
    987. "species": "virginica"
    988. },
    989. {
    990. "sepalLength": 6.3,
    991. "sepalWidth": 3.4,
    992. "petalLength": 5.6,
    993. "petalWidth": 2.4,
    994. "species": "virginica"
    995. },
    996. {
    997. "sepalLength": 6.4,
    998. "sepalWidth": 3.1,
    999. "petalLength": 5.5,
    1000. "petalWidth": 1.8,
    1001. "species": "virginica"
    1002. },
    1003. {
    1004. "sepalLength": 6.0,
    1005. "sepalWidth": 3.0,
    1006. "petalLength": 4.8,
    1007. "petalWidth": 1.8,
    1008. "species": "virginica"
    1009. },
    1010. {
    1011. "sepalLength": 6.9,
    1012. "sepalWidth": 3.1,
    1013. "petalLength": 5.4,
    1014. "petalWidth": 2.1,
    1015. "species": "virginica"
    1016. },
    1017. {
    1018. "sepalLength": 6.7,
    1019. "sepalWidth": 3.1,
    1020. "petalLength": 5.6,
    1021. "petalWidth": 2.4,
    1022. "species": "virginica"
    1023. },
    1024. {
    1025. "sepalLength": 6.9,
    1026. "sepalWidth": 3.1,
    1027. "petalLength": 5.1,
    1028. "petalWidth": 2.3,
    1029. "species": "virginica"
    1030. },
    1031. {
    1032. "sepalLength": 5.8,
    1033. "sepalWidth": 2.7,
    1034. "petalLength": 5.1,
    1035. "petalWidth": 1.9,
    1036. "species": "virginica"
    1037. },
    1038. {
    1039. "sepalLength": 6.8,
    1040. "sepalWidth": 3.2,
    1041. "petalLength": 5.9,
    1042. "petalWidth": 2.3,
    1043. "species": "virginica"
    1044. },
    1045. {
    1046. "sepalLength": 6.7,
    1047. "sepalWidth": 3.3,
    1048. "petalLength": 5.7,
    1049. "petalWidth": 2.5,
    1050. "species": "virginica"
    1051. },
    1052. {
    1053. "sepalLength": 6.7,
    1054. "sepalWidth": 3.0,
    1055. "petalLength": 5.2,
    1056. "petalWidth": 2.3,
    1057. "species": "virginica"
    1058. },
    1059. {
    1060. "sepalLength": 6.3,
    1061. "sepalWidth": 2.5,
    1062. "petalLength": 5.0,
    1063. "petalWidth": 1.9,
    1064. "species": "virginica"
    1065. },
    1066. {
    1067. "sepalLength": 6.5,
    1068. "sepalWidth": 3.0,
    1069. "petalLength": 5.2,
    1070. "petalWidth": 2.0,
    1071. "species": "virginica"
    1072. },
    1073. {
    1074. "sepalLength": 6.2,
    1075. "sepalWidth": 3.4,
    1076. "petalLength": 5.4,
    1077. "petalWidth": 2.3,
    1078. "species": "virginica"
    1079. },
    1080. {
    1081. "sepalLength": 5.9,
    1082. "sepalWidth": 3.0,
    1083. "petalLength": 5.1,
    1084. "petalWidth": 1.8,
    1085. "species": "virginica"
    1086. }
    1087. ]
    1088. };
    1089.  
    1090. var cdata = {
    1091. globals: {
    1092. fontFamily: 'Lucida Sans Unicode'
    1093. },
    1094. backgroundColor: '#fff',
    1095. flat: true,
    1096. graphset: []
    1097. };
    1098.  
    1099. var traits = flowers.traits;
    1100. var species = flowers.species;
    1101. var data = flowers.values;
    1102.  
    1103. var series = {};
    1104. for (var i = 0; i < data.length; i++) {
    1105. var set = data[i],
    1106. key, val, point, index;
    1107. for (var r = 0; r < traits.length; r++) {
    1108. for (var c = 0; c < traits.length; c++) {
    1109. key = traits[c];
    1110. val = traits[r];
    1111. point = [set[key], set[val]];
    1112. index = species.indexOf(set.species);
    1113. series['g_' + r + '_' + c] = series['g_' + r + '_' + c] || [];
    1114. series['g_' + r + '_' + c][index] = series['g_' + r + '_' + c][index] || {};
    1115. series['g_' + r + '_' + c][index].text = set.species;
    1116. series['g_' + r + '_' + c][index].values = series['g_' + r + '_' + c][index].values || [];
    1117. series['g_' + r + '_' + c][index].values.push(point);
    1118. }
    1119. }
    1120. }
    1121.  
    1122. for (var r = 0; r < traits.length; r++) {
    1123. for (var c = 0; c < traits.length; c++) {
    1124. var gdata = {
    1125. width: 200,
    1126. height: 200,
    1127. x: 20 + c * 200,
    1128. y: (traits.length - 1 - r) * 200,
    1129. type: 'scatter',
    1130. plotarea: {
    1131. maskTolerance: [10, 10],
    1132. marginTop: 10,
    1133. marginRight: 10,
    1134. marginBottom: 10,
    1135. marginLeft: 10
    1136. },
    1137. scaleX: {
    1138. lineWidth: 0,
    1139. offset: 0,
    1140. item: {
    1141. fontSize: 10
    1142. },
    1143. guide: {
    1144. lineStyle: 'solid',
    1145. lineColor: '#bbb'
    1146. },
    1147. tick: {
    1148. lineColor: '#bbb'
    1149. }
    1150. },
    1151. scaleY: {
    1152. lineWidth: 0,
    1153. offset: 0,
    1154. minValue: 'auto',
    1155. item: {
    1156. fontSize: 10
    1157. },
    1158. guide: {
    1159. lineStyle: 'solid',
    1160. lineColor: '#bbb'
    1161. },
    1162. tick: {
    1163. lineColor: '#bbb'
    1164. }
    1165. },
    1166. plot: {
    1167. marker: {
    1168. borderWidth: 0,
    1169. size: 3.5,
    1170. alpha: 0.75
    1171. },
    1172. tooltipText: '%plot-text<br>[%scale-key-text, %scale-value-text]'
    1173. },
    1174. tooltip: {
    1175. fontSize: 15,
    1176. padding: 10
    1177. },
    1178. series: series['g_' + r + '_' + c]
    1179. };
    1180. if (c === r) {
    1181. gdata.title = {
    1182. text: traits[c],
    1183. fontSize: 10,
    1184. align: 'left',
    1185. padding: '15 20'
    1186. };
    1187. }
    1188. if (c > 0) {
    1189. gdata.scaleY.item.visible = false;
    1190. }
    1191. if (r > 0) {
    1192. gdata.scaleX.item.visible = false;
    1193. }
    1194. cdata.graphset.push(gdata);
    1195. }
    1196. }
    1197.  
    1198. zingchart.render({
    1199. id: 'zc',
    1200. width: traits.length * 200 + 20,
    1201. height: traits.length * 200 + 20,
    1202. output: 'svg',
    1203. data: cdata
    1204. });
    1205. </script>
    1206. </body>
    1207.  
    1208. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    9. </head>
    10.  
    11. <body>
    12. <div id="zc"></div>
    13. </body>
    14.  
    15. </html>
    1. html,
    2. body {
    3. height: 100%;
    4. width: 100%;
    5. margin: 0;
    6. padding: 0;
    7. }
    8.  
    9. #myChart {
    10. height: 100%;
    11. width: 100%;
    12. min-height: 150px;
    13. }
    14.  
    15. .zc-ref {
    16. display: none;
    17. }
    1. var flowers = {
    2. "traits": ["sepalLength", "sepalWidth", "petalLength", "petalWidth"],
    3. "species": ["setosa", "versicolor", "virginica"],
    4. "values": [{
    5. "sepalLength": 5.1,
    6. "sepalWidth": 3.5,
    7. "petalLength": 1.4,
    8. "petalWidth": 0.2,
    9. "species": "setosa"
    10. },
    11. {
    12. "sepalLength": 4.9,
    13. "sepalWidth": 3.0,
    14. "petalLength": 1.4,
    15. "petalWidth": 0.2,
    16. "species": "setosa"
    17. },
    18. {
    19. "sepalLength": 4.7,
    20. "sepalWidth": 3.2,
    21. "petalLength": 1.3,
    22. "petalWidth": 0.2,
    23. "species": "setosa"
    24. },
    25. {
    26. "sepalLength": 4.6,
    27. "sepalWidth": 3.1,
    28. "petalLength": 1.5,
    29. "petalWidth": 0.2,
    30. "species": "setosa"
    31. },
    32. {
    33. "sepalLength": 5.0,
    34. "sepalWidth": 3.6,
    35. "petalLength": 1.4,
    36. "petalWidth": 0.2,
    37. "species": "setosa"
    38. },
    39. {
    40. "sepalLength": 5.4,
    41. "sepalWidth": 3.9,
    42. "petalLength": 1.7,
    43. "petalWidth": 0.4,
    44. "species": "setosa"
    45. },
    46. {
    47. "sepalLength": 4.6,
    48. "sepalWidth": 3.4,
    49. "petalLength": 1.4,
    50. "petalWidth": 0.3,
    51. "species": "setosa"
    52. },
    53. {
    54. "sepalLength": 5.0,
    55. "sepalWidth": 3.4,
    56. "petalLength": 1.5,
    57. "petalWidth": 0.2,
    58. "species": "setosa"
    59. },
    60. {
    61. "sepalLength": 4.4,
    62. "sepalWidth": 2.9,
    63. "petalLength": 1.4,
    64. "petalWidth": 0.2,
    65. "species": "setosa"
    66. },
    67. {
    68. "sepalLength": 4.9,
    69. "sepalWidth": 3.1,
    70. "petalLength": 1.5,
    71. "petalWidth": 0.1,
    72. "species": "setosa"
    73. },
    74. {
    75. "sepalLength": 5.4,
    76. "sepalWidth": 3.7,
    77. "petalLength": 1.5,
    78. "petalWidth": 0.2,
    79. "species": "setosa"
    80. },
    81. {
    82. "sepalLength": 4.8,
    83. "sepalWidth": 3.4,
    84. "petalLength": 1.6,
    85. "petalWidth": 0.2,
    86. "species": "setosa"
    87. },
    88. {
    89. "sepalLength": 4.8,
    90. "sepalWidth": 3.0,
    91. "petalLength": 1.4,
    92. "petalWidth": 0.1,
    93. "species": "setosa"
    94. },
    95. {
    96. "sepalLength": 4.3,
    97. "sepalWidth": 3.0,
    98. "petalLength": 1.1,
    99. "petalWidth": 0.1,
    100. "species": "setosa"
    101. },
    102. {
    103. "sepalLength": 5.8,
    104. "sepalWidth": 4.0,
    105. "petalLength": 1.2,
    106. "petalWidth": 0.2,
    107. "species": "setosa"
    108. },
    109. {
    110. "sepalLength": 5.7,
    111. "sepalWidth": 4.4,
    112. "petalLength": 1.5,
    113. "petalWidth": 0.4,
    114. "species": "setosa"
    115. },
    116. {
    117. "sepalLength": 5.4,
    118. "sepalWidth": 3.9,
    119. "petalLength": 1.3,
    120. "petalWidth": 0.4,
    121. "species": "setosa"
    122. },
    123. {
    124. "sepalLength": 5.1,
    125. "sepalWidth": 3.5,
    126. "petalLength": 1.4,
    127. "petalWidth": 0.3,
    128. "species": "setosa"
    129. },
    130. {
    131. "sepalLength": 5.7,
    132. "sepalWidth": 3.8,
    133. "petalLength": 1.7,
    134. "petalWidth": 0.3,
    135. "species": "setosa"
    136. },
    137. {
    138. "sepalLength": 5.1,
    139. "sepalWidth": 3.8,
    140. "petalLength": 1.5,
    141. "petalWidth": 0.3,
    142. "species": "setosa"
    143. },
    144. {
    145. "sepalLength": 5.4,
    146. "sepalWidth": 3.4,
    147. "petalLength": 1.7,
    148. "petalWidth": 0.2,
    149. "species": "setosa"
    150. },
    151. {
    152. "sepalLength": 5.1,
    153. "sepalWidth": 3.7,
    154. "petalLength": 1.5,
    155. "petalWidth": 0.4,
    156. "species": "setosa"
    157. },
    158. {
    159. "sepalLength": 4.6,
    160. "sepalWidth": 3.6,
    161. "petalLength": 1.0,
    162. "petalWidth": 0.2,
    163. "species": "setosa"
    164. },
    165. {
    166. "sepalLength": 5.1,
    167. "sepalWidth": 3.3,
    168. "petalLength": 1.7,
    169. "petalWidth": 0.5,
    170. "species": "setosa"
    171. },
    172. {
    173. "sepalLength": 4.8,
    174. "sepalWidth": 3.4,
    175. "petalLength": 1.9,
    176. "petalWidth": 0.2,
    177. "species": "setosa"
    178. },
    179. {
    180. "sepalLength": 5.0,
    181. "sepalWidth": 3.0,
    182. "petalLength": 1.6,
    183. "petalWidth": 0.2,
    184. "species": "setosa"
    185. },
    186. {
    187. "sepalLength": 5.0,
    188. "sepalWidth": 3.4,
    189. "petalLength": 1.6,
    190. "petalWidth": 0.4,
    191. "species": "setosa"
    192. },
    193. {
    194. "sepalLength": 5.2,
    195. "sepalWidth": 3.5,
    196. "petalLength": 1.5,
    197. "petalWidth": 0.2,
    198. "species": "setosa"
    199. },
    200. {
    201. "sepalLength": 5.2,
    202. "sepalWidth": 3.4,
    203. "petalLength": 1.4,
    204. "petalWidth": 0.2,
    205. "species": "setosa"
    206. },
    207. {
    208. "sepalLength": 4.7,
    209. "sepalWidth": 3.2,
    210. "petalLength": 1.6,
    211. "petalWidth": 0.2,
    212. "species": "setosa"
    213. },
    214. {
    215. "sepalLength": 4.8,
    216. "sepalWidth": 3.1,
    217. "petalLength": 1.6,
    218. "petalWidth": 0.2,
    219. "species": "setosa"
    220. },
    221. {
    222. "sepalLength": 5.4,
    223. "sepalWidth": 3.4,
    224. "petalLength": 1.5,
    225. "petalWidth": 0.4,
    226. "species": "setosa"
    227. },
    228. {
    229. "sepalLength": 5.2,
    230. "sepalWidth": 4.1,
    231. "petalLength": 1.5,
    232. "petalWidth": 0.1,
    233. "species": "setosa"
    234. },
    235. {
    236. "sepalLength": 5.5,
    237. "sepalWidth": 4.2,
    238. "petalLength": 1.4,
    239. "petalWidth": 0.2,
    240. "species": "setosa"
    241. },
    242. {
    243. "sepalLength": 4.9,
    244. "sepalWidth": 3.1,
    245. "petalLength": 1.5,
    246. "petalWidth": 0.2,
    247. "species": "setosa"
    248. },
    249. {
    250. "sepalLength": 5.0,
    251. "sepalWidth": 3.2,
    252. "petalLength": 1.2,
    253. "petalWidth": 0.2,
    254. "species": "setosa"
    255. },
    256. {
    257. "sepalLength": 5.5,
    258. "sepalWidth": 3.5,
    259. "petalLength": 1.3,
    260. "petalWidth": 0.2,
    261. "species": "setosa"
    262. },
    263. {
    264. "sepalLength": 4.9,
    265. "sepalWidth": 3.6,
    266. "petalLength": 1.4,
    267. "petalWidth": 0.1,
    268. "species": "setosa"
    269. },
    270. {
    271. "sepalLength": 4.4,
    272. "sepalWidth": 3.0,
    273. "petalLength": 1.3,
    274. "petalWidth": 0.2,
    275. "species": "setosa"
    276. },
    277. {
    278. "sepalLength": 5.1,
    279. "sepalWidth": 3.4,
    280. "petalLength": 1.5,
    281. "petalWidth": 0.2,
    282. "species": "setosa"
    283. },
    284. {
    285. "sepalLength": 5.0,
    286. "sepalWidth": 3.5,
    287. "petalLength": 1.3,
    288. "petalWidth": 0.3,
    289. "species": "setosa"
    290. },
    291. {
    292. "sepalLength": 4.5,
    293. "sepalWidth": 2.3,
    294. "petalLength": 1.3,
    295. "petalWidth": 0.3,
    296. "species": "setosa"
    297. },
    298. {
    299. "sepalLength": 4.4,
    300. "sepalWidth": 3.2,
    301. "petalLength": 1.3,
    302. "petalWidth": 0.2,
    303. "species": "setosa"
    304. },
    305. {
    306. "sepalLength": 5.0,
    307. "sepalWidth": 3.5,
    308. "petalLength": 1.6,
    309. "petalWidth": 0.6,
    310. "species": "setosa"
    311. },
    312. {
    313. "sepalLength": 5.1,
    314. "sepalWidth": 3.8,
    315. "petalLength": 1.9,
    316. "petalWidth": 0.4,
    317. "species": "setosa"
    318. },
    319. {
    320. "sepalLength": 4.8,
    321. "sepalWidth": 3.0,
    322. "petalLength": 1.4,
    323. "petalWidth": 0.3,
    324. "species": "setosa"
    325. },
    326. {
    327. "sepalLength": 5.1,
    328. "sepalWidth": 3.8,
    329. "petalLength": 1.6,
    330. "petalWidth": 0.2,
    331. "species": "setosa"
    332. },
    333. {
    334. "sepalLength": 4.6,
    335. "sepalWidth": 3.2,
    336. "petalLength": 1.4,
    337. "petalWidth": 0.2,
    338. "species": "setosa"
    339. },
    340. {
    341. "sepalLength": 5.3,
    342. "sepalWidth": 3.7,
    343. "petalLength": 1.5,
    344. "petalWidth": 0.2,
    345. "species": "setosa"
    346. },
    347. {
    348. "sepalLength": 5.0,
    349. "sepalWidth": 3.3,
    350. "petalLength": 1.4,
    351. "petalWidth": 0.2,
    352. "species": "setosa"
    353. },
    354. {
    355. "sepalLength": 7.0,
    356. "sepalWidth": 3.2,
    357. "petalLength": 4.7,
    358. "petalWidth": 1.4,
    359. "species": "versicolor"
    360. },
    361. {
    362. "sepalLength": 6.4,
    363. "sepalWidth": 3.2,
    364. "petalLength": 4.5,
    365. "petalWidth": 1.5,
    366. "species": "versicolor"
    367. },
    368. {
    369. "sepalLength": 6.9,
    370. "sepalWidth": 3.1,
    371. "petalLength": 4.9,
    372. "petalWidth": 1.5,
    373. "species": "versicolor"
    374. },
    375. {
    376. "sepalLength": 5.5,
    377. "sepalWidth": 2.3,
    378. "petalLength": 4.0,
    379. "petalWidth": 1.3,
    380. "species": "versicolor"
    381. },
    382. {
    383. "sepalLength": 6.5,
    384. "sepalWidth": 2.8,
    385. "petalLength": 4.6,
    386. "petalWidth": 1.5,
    387. "species": "versicolor"
    388. },
    389. {
    390. "sepalLength": 5.7,
    391. "sepalWidth": 2.8,
    392. "petalLength": 4.5,
    393. "petalWidth": 1.3,
    394. "species": "versicolor"
    395. },
    396. {
    397. "sepalLength": 6.3,
    398. "sepalWidth": 3.3,
    399. "petalLength": 4.7,
    400. "petalWidth": 1.6,
    401. "species": "versicolor"
    402. },
    403. {
    404. "sepalLength": 4.9,
    405. "sepalWidth": 2.4,
    406. "petalLength": 3.3,
    407. "petalWidth": 1.0,
    408. "species": "versicolor"
    409. },
    410. {
    411. "sepalLength": 6.6,
    412. "sepalWidth": 2.9,
    413. "petalLength": 4.6,
    414. "petalWidth": 1.3,
    415. "species": "versicolor"
    416. },
    417. {
    418. "sepalLength": 5.2,
    419. "sepalWidth": 2.7,
    420. "petalLength": 3.9,
    421. "petalWidth": 1.4,
    422. "species": "versicolor"
    423. },
    424. {
    425. "sepalLength": 5.0,
    426. "sepalWidth": 2.0,
    427. "petalLength": 3.5,
    428. "petalWidth": 1.0,
    429. "species": "versicolor"
    430. },
    431. {
    432. "sepalLength": 5.9,
    433. "sepalWidth": 3.0,
    434. "petalLength": 4.2,
    435. "petalWidth": 1.5,
    436. "species": "versicolor"
    437. },
    438. {
    439. "sepalLength": 6.0,
    440. "sepalWidth": 2.2,
    441. "petalLength": 4.0,
    442. "petalWidth": 1.0,
    443. "species": "versicolor"
    444. },
    445. {
    446. "sepalLength": 6.1,
    447. "sepalWidth": 2.9,
    448. "petalLength": 4.7,
    449. "petalWidth": 1.4,
    450. "species": "versicolor"
    451. },
    452. {
    453. "sepalLength": 5.6,
    454. "sepalWidth": 2.9,
    455. "petalLength": 3.6,
    456. "petalWidth": 1.3,
    457. "species": "versicolor"
    458. },
    459. {
    460. "sepalLength": 6.7,
    461. "sepalWidth": 3.1,
    462. "petalLength": 4.4,
    463. "petalWidth": 1.4,
    464. "species": "versicolor"
    465. },
    466. {
    467. "sepalLength": 5.6,
    468. "sepalWidth": 3.0,
    469. "petalLength": 4.5,
    470. "petalWidth": 1.5,
    471. "species": "versicolor"
    472. },
    473. {
    474. "sepalLength": 5.8,
    475. "sepalWidth": 2.7,
    476. "petalLength": 4.1,
    477. "petalWidth": 1.0,
    478. "species": "versicolor"
    479. },
    480. {
    481. "sepalLength": 6.2,
    482. "sepalWidth": 2.2,
    483. "petalLength": 4.5,
    484. "petalWidth": 1.5,
    485. "species": "versicolor"
    486. },
    487. {
    488. "sepalLength": 5.6,
    489. "sepalWidth": 2.5,
    490. "petalLength": 3.9,
    491. "petalWidth": 1.1,
    492. "species": "versicolor"
    493. },
    494. {
    495. "sepalLength": 5.9,
    496. "sepalWidth": 3.2,
    497. "petalLength": 4.8,
    498. "petalWidth": 1.8,
    499. "species": "versicolor"
    500. },
    501. {
    502. "sepalLength": 6.1,
    503. "sepalWidth": 2.8,
    504. "petalLength": 4.0,
    505. "petalWidth": 1.3,
    506. "species": "versicolor"
    507. },
    508. {
    509. "sepalLength": 6.3,
    510. "sepalWidth": 2.5,
    511. "petalLength": 4.9,
    512. "petalWidth": 1.5,
    513. "species": "versicolor"
    514. },
    515. {
    516. "sepalLength": 6.1,
    517. "sepalWidth": 2.8,
    518. "petalLength": 4.7,
    519. "petalWidth": 1.2,
    520. "species": "versicolor"
    521. },
    522. {
    523. "sepalLength": 6.4,
    524. "sepalWidth": 2.9,
    525. "petalLength": 4.3,
    526. "petalWidth": 1.3,
    527. "species": "versicolor"
    528. },
    529. {
    530. "sepalLength": 6.6,
    531. "sepalWidth": 3.0,
    532. "petalLength": 4.4,
    533. "petalWidth": 1.4,
    534. "species": "versicolor"
    535. },
    536. {
    537. "sepalLength": 6.8,
    538. "sepalWidth": 2.8,
    539. "petalLength": 4.8,
    540. "petalWidth": 1.4,
    541. "species": "versicolor"
    542. },
    543. {
    544. "sepalLength": 6.7,
    545. "sepalWidth": 3.0,
    546. "petalLength": 5.0,
    547. "petalWidth": 1.7,
    548. "species": "versicolor"
    549. },
    550. {
    551. "sepalLength": 6.0,
    552. "sepalWidth": 2.9,
    553. "petalLength": 4.5,
    554. "petalWidth": 1.5,
    555. "species": "versicolor"
    556. },
    557. {
    558. "sepalLength": 5.7,
    559. "sepalWidth": 2.6,
    560. "petalLength": 3.5,
    561. "petalWidth": 1.0,
    562. "species": "versicolor"
    563. },
    564. {
    565. "sepalLength": 5.5,
    566. "sepalWidth": 2.4,
    567. "petalLength": 3.8,
    568. "petalWidth": 1.1,
    569. "species": "versicolor"
    570. },
    571. {
    572. "sepalLength": 5.5,
    573. "sepalWidth": 2.4,
    574. "petalLength": 3.7,
    575. "petalWidth": 1.0,
    576. "species": "versicolor"
    577. },
    578. {
    579. "sepalLength": 5.8,
    580. "sepalWidth": 2.7,
    581. "petalLength": 3.9,
    582. "petalWidth": 1.2,
    583. "species": "versicolor"
    584. },
    585. {
    586. "sepalLength": 6.0,
    587. "sepalWidth": 2.7,
    588. "petalLength": 5.1,
    589. "petalWidth": 1.6,
    590. "species": "versicolor"
    591. },
    592. {
    593. "sepalLength": 5.4,
    594. "sepalWidth": 3.0,
    595. "petalLength": 4.5,
    596. "petalWidth": 1.5,
    597. "species": "versicolor"
    598. },
    599. {
    600. "sepalLength": 6.0,
    601. "sepalWidth": 3.4,
    602. "petalLength": 4.5,
    603. "petalWidth": 1.6,
    604. "species": "versicolor"
    605. },
    606. {
    607. "sepalLength": 6.7,
    608. "sepalWidth": 3.1,
    609. "petalLength": 4.7,
    610. "petalWidth": 1.5,
    611. "species": "versicolor"
    612. },
    613. {
    614. "sepalLength": 6.3,
    615. "sepalWidth": 2.3,
    616. "petalLength": 4.4,
    617. "petalWidth": 1.3,
    618. "species": "versicolor"
    619. },
    620. {
    621. "sepalLength": 5.6,
    622. "sepalWidth": 3.0,
    623. "petalLength": 4.1,
    624. "petalWidth": 1.3,
    625. "species": "versicolor"
    626. },
    627. {
    628. "sepalLength": 5.5,
    629. "sepalWidth": 2.5,
    630. "petalLength": 4.0,
    631. "petalWidth": 1.3,
    632. "species": "versicolor"
    633. },
    634. {
    635. "sepalLength": 5.5,
    636. "sepalWidth": 2.6,
    637. "petalLength": 4.4,
    638. "petalWidth": 1.2,
    639. "species": "versicolor"
    640. },
    641. {
    642. "sepalLength": 6.1,
    643. "sepalWidth": 3.0,
    644. "petalLength": 4.6,
    645. "petalWidth": 1.4,
    646. "species": "versicolor"
    647. },
    648. {
    649. "sepalLength": 5.8,
    650. "sepalWidth": 2.6,
    651. "petalLength": 4.0,
    652. "petalWidth": 1.2,
    653. "species": "versicolor"
    654. },
    655. {
    656. "sepalLength": 5.0,
    657. "sepalWidth": 2.3,
    658. "petalLength": 3.3,
    659. "petalWidth": 1.0,
    660. "species": "versicolor"
    661. },
    662. {
    663. "sepalLength": 5.6,
    664. "sepalWidth": 2.7,
    665. "petalLength": 4.2,
    666. "petalWidth": 1.3,
    667. "species": "versicolor"
    668. },
    669. {
    670. "sepalLength": 5.7,
    671. "sepalWidth": 3.0,
    672. "petalLength": 4.2,
    673. "petalWidth": 1.2,
    674. "species": "versicolor"
    675. },
    676. {
    677. "sepalLength": 5.7,
    678. "sepalWidth": 2.9,
    679. "petalLength": 4.2,
    680. "petalWidth": 1.3,
    681. "species": "versicolor"
    682. },
    683. {
    684. "sepalLength": 6.2,
    685. "sepalWidth": 2.9,
    686. "petalLength": 4.3,
    687. "petalWidth": 1.3,
    688. "species": "versicolor"
    689. },
    690. {
    691. "sepalLength": 5.1,
    692. "sepalWidth": 2.5,
    693. "petalLength": 3.0,
    694. "petalWidth": 1.1,
    695. "species": "versicolor"
    696. },
    697. {
    698. "sepalLength": 5.7,
    699. "sepalWidth": 2.8,
    700. "petalLength": 4.1,
    701. "petalWidth": 1.3,
    702. "species": "versicolor"
    703. },
    704. {
    705. "sepalLength": 6.3,
    706. "sepalWidth": 3.3,
    707. "petalLength": 6.0,
    708. "petalWidth": 2.5,
    709. "species": "virginica"
    710. },
    711. {
    712. "sepalLength": 5.8,
    713. "sepalWidth": 2.7,
    714. "petalLength": 5.1,
    715. "petalWidth": 1.9,
    716. "species": "virginica"
    717. },
    718. {
    719. "sepalLength": 7.1,
    720. "sepalWidth": 3.0,
    721. "petalLength": 5.9,
    722. "petalWidth": 2.1,
    723. "species": "virginica"
    724. },
    725. {
    726. "sepalLength": 6.3,
    727. "sepalWidth": 2.9,
    728. "petalLength": 5.6,
    729. "petalWidth": 1.8,
    730. "species": "virginica"
    731. },
    732. {
    733. "sepalLength": 6.5,
    734. "sepalWidth": 3.0,
    735. "petalLength": 5.8,
    736. "petalWidth": 2.2,
    737. "species": "virginica"
    738. },
    739. {
    740. "sepalLength": 7.6,
    741. "sepalWidth": 3.0,
    742. "petalLength": 6.6,
    743. "petalWidth": 2.1,
    744. "species": "virginica"
    745. },
    746. {
    747. "sepalLength": 4.9,
    748. "sepalWidth": 2.5,
    749. "petalLength": 4.5,
    750. "petalWidth": 1.7,
    751. "species": "virginica"
    752. },
    753. {
    754. "sepalLength": 7.3,
    755. "sepalWidth": 2.9,
    756. "petalLength": 6.3,
    757. "petalWidth": 1.8,
    758. "species": "virginica"
    759. },
    760. {
    761. "sepalLength": 6.7,
    762. "sepalWidth": 2.5,
    763. "petalLength": 5.8,
    764. "petalWidth": 1.8,
    765. "species": "virginica"
    766. },
    767. {
    768. "sepalLength": 7.2,
    769. "sepalWidth": 3.6,
    770. "petalLength": 6.1,
    771. "petalWidth": 2.5,
    772. "species": "virginica"
    773. },
    774. {
    775. "sepalLength": 6.5,
    776. "sepalWidth": 3.2,
    777. "petalLength": 5.1,
    778. "petalWidth": 2.0,
    779. "species": "virginica"
    780. },
    781. {
    782. "sepalLength": 6.4,
    783. "sepalWidth": 2.7,
    784. "petalLength": 5.3,
    785. "petalWidth": 1.9,
    786. "species": "virginica"
    787. },
    788. {
    789. "sepalLength": 6.8,
    790. "sepalWidth": 3.0,
    791. "petalLength": 5.5,
    792. "petalWidth": 2.1,
    793. "species": "virginica"
    794. },
    795. {
    796. "sepalLength": 5.7,
    797. "sepalWidth": 2.5,
    798. "petalLength": 5.0,
    799. "petalWidth": 2.0,
    800. "species": "virginica"
    801. },
    802. {
    803. "sepalLength": 5.8,
    804. "sepalWidth": 2.8,
    805. "petalLength": 5.1,
    806. "petalWidth": 2.4,
    807. "species": "virginica"
    808. },
    809. {
    810. "sepalLength": 6.4,
    811. "sepalWidth": 3.2,
    812. "petalLength": 5.3,
    813. "petalWidth": 2.3,
    814. "species": "virginica"
    815. },
    816. {
    817. "sepalLength": 6.5,
    818. "sepalWidth": 3.0,
    819. "petalLength": 5.5,
    820. "petalWidth": 1.8,
    821. "species": "virginica"
    822. },
    823. {
    824. "sepalLength": 7.7,
    825. "sepalWidth": 3.8,
    826. "petalLength": 6.7,
    827. "petalWidth": 2.2,
    828. "species": "virginica"
    829. },
    830. {
    831. "sepalLength": 7.7,
    832. "sepalWidth": 2.6,
    833. "petalLength": 6.9,
    834. "petalWidth": 2.3,
    835. "species": "virginica"
    836. },
    837. {
    838. "sepalLength": 6.0,
    839. "sepalWidth": 2.2,
    840. "petalLength": 5.0,
    841. "petalWidth": 1.5,
    842. "species": "virginica"
    843. },
    844. {
    845. "sepalLength": 6.9,
    846. "sepalWidth": 3.2,
    847. "petalLength": 5.7,
    848. "petalWidth": 2.3,
    849. "species": "virginica"
    850. },
    851. {
    852. "sepalLength": 5.6,
    853. "sepalWidth": 2.8,
    854. "petalLength": 4.9,
    855. "petalWidth": 2.0,
    856. "species": "virginica"
    857. },
    858. {
    859. "sepalLength": 7.7,
    860. "sepalWidth": 2.8,
    861. "petalLength": 6.7,
    862. "petalWidth": 2.0,
    863. "species": "virginica"
    864. },
    865. {
    866. "sepalLength": 6.3,
    867. "sepalWidth": 2.7,
    868. "petalLength": 4.9,
    869. "petalWidth": 1.8,
    870. "species": "virginica"
    871. },
    872. {
    873. "sepalLength": 6.7,
    874. "sepalWidth": 3.3,
    875. "petalLength": 5.7,
    876. "petalWidth": 2.1,
    877. "species": "virginica"
    878. },
    879. {
    880. "sepalLength": 7.2,
    881. "sepalWidth": 3.2,
    882. "petalLength": 6.0,
    883. "petalWidth": 1.8,
    884. "species": "virginica"
    885. },
    886. {
    887. "sepalLength": 6.2,
    888. "sepalWidth": 2.8,
    889. "petalLength": 4.8,
    890. "petalWidth": 1.8,
    891. "species": "virginica"
    892. },
    893. {
    894. "sepalLength": 6.1,
    895. "sepalWidth": 3.0,
    896. "petalLength": 4.9,
    897. "petalWidth": 1.8,
    898. "species": "virginica"
    899. },
    900. {
    901. "sepalLength": 6.4,
    902. "sepalWidth": 2.8,
    903. "petalLength": 5.6,
    904. "petalWidth": 2.1,
    905. "species": "virginica"
    906. },
    907. {
    908. "sepalLength": 7.2,
    909. "sepalWidth": 3.0,
    910. "petalLength": 5.8,
    911. "petalWidth": 1.6,
    912. "species": "virginica"
    913. },
    914. {
    915. "sepalLength": 7.4,
    916. "sepalWidth": 2.8,
    917. "petalLength": 6.1,
    918. "petalWidth": 1.9,
    919. "species": "virginica"
    920. },
    921. {
    922. "sepalLength": 7.9,
    923. "sepalWidth": 3.8,
    924. "petalLength": 6.4,
    925. "petalWidth": 2.0,
    926. "species": "virginica"
    927. },
    928. {
    929. "sepalLength": 6.4,
    930. "sepalWidth": 2.8,
    931. "petalLength": 5.6,
    932. "petalWidth": 2.2,
    933. "species": "virginica"
    934. },
    935. {
    936. "sepalLength": 6.3,
    937. "sepalWidth": 2.8,
    938. "petalLength": 5.1,
    939. "petalWidth": 1.5,
    940. "species": "virginica"
    941. },
    942. {
    943. "sepalLength": 6.1,
    944. "sepalWidth": 2.6,
    945. "petalLength": 5.6,
    946. "petalWidth": 1.4,
    947. "species": "virginica"
    948. },
    949. {
    950. "sepalLength": 7.7,
    951. "sepalWidth": 3.0,
    952. "petalLength": 6.1,
    953. "petalWidth": 2.3,
    954. "species": "virginica"
    955. },
    956. {
    957. "sepalLength": 6.3,
    958. "sepalWidth": 3.4,
    959. "petalLength": 5.6,
    960. "petalWidth": 2.4,
    961. "species": "virginica"
    962. },
    963. {
    964. "sepalLength": 6.4,
    965. "sepalWidth": 3.1,
    966. "petalLength": 5.5,
    967. "petalWidth": 1.8,
    968. "species": "virginica"
    969. },
    970. {
    971. "sepalLength": 6.0,
    972. "sepalWidth": 3.0,
    973. "petalLength": 4.8,
    974. "petalWidth": 1.8,
    975. "species": "virginica"
    976. },
    977. {
    978. "sepalLength": 6.9,
    979. "sepalWidth": 3.1,
    980. "petalLength": 5.4,
    981. "petalWidth": 2.1,
    982. "species": "virginica"
    983. },
    984. {
    985. "sepalLength": 6.7,
    986. "sepalWidth": 3.1,
    987. "petalLength": 5.6,
    988. "petalWidth": 2.4,
    989. "species": "virginica"
    990. },
    991. {
    992. "sepalLength": 6.9,
    993. "sepalWidth": 3.1,
    994. "petalLength": 5.1,
    995. "petalWidth": 2.3,
    996. "species": "virginica"
    997. },
    998. {
    999. "sepalLength": 5.8,
    1000. "sepalWidth": 2.7,
    1001. "petalLength": 5.1,
    1002. "petalWidth": 1.9,
    1003. "species": "virginica"
    1004. },
    1005. {
    1006. "sepalLength": 6.8,
    1007. "sepalWidth": 3.2,
    1008. "petalLength": 5.9,
    1009. "petalWidth": 2.3,
    1010. "species": "virginica"
    1011. },
    1012. {
    1013. "sepalLength": 6.7,
    1014. "sepalWidth": 3.3,
    1015. "petalLength": 5.7,
    1016. "petalWidth": 2.5,
    1017. "species": "virginica"
    1018. },
    1019. {
    1020. "sepalLength": 6.7,
    1021. "sepalWidth": 3.0,
    1022. "petalLength": 5.2,
    1023. "petalWidth": 2.3,
    1024. "species": "virginica"
    1025. },
    1026. {
    1027. "sepalLength": 6.3,
    1028. "sepalWidth": 2.5,
    1029. "petalLength": 5.0,
    1030. "petalWidth": 1.9,
    1031. "species": "virginica"
    1032. },
    1033. {
    1034. "sepalLength": 6.5,
    1035. "sepalWidth": 3.0,
    1036. "petalLength": 5.2,
    1037. "petalWidth": 2.0,
    1038. "species": "virginica"
    1039. },
    1040. {
    1041. "sepalLength": 6.2,
    1042. "sepalWidth": 3.4,
    1043. "petalLength": 5.4,
    1044. "petalWidth": 2.3,
    1045. "species": "virginica"
    1046. },
    1047. {
    1048. "sepalLength": 5.9,
    1049. "sepalWidth": 3.0,
    1050. "petalLength": 5.1,
    1051. "petalWidth": 1.8,
    1052. "species": "virginica"
    1053. }
    1054. ]
    1055. };
    1056.  
    1057. var cdata = {
    1058. globals: {
    1059. fontFamily: 'Lucida Sans Unicode'
    1060. },
    1061. backgroundColor: '#fff',
    1062. flat: true,
    1063. graphset: []
    1064. };
    1065.  
    1066. var traits = flowers.traits;
    1067. var species = flowers.species;
    1068. var data = flowers.values;
    1069.  
    1070. var series = {};
    1071. for (var i = 0; i < data.length; i++) {
    1072. var set = data[i],
    1073. key, val, point, index;
    1074. for (var r = 0; r < traits.length; r++) {
    1075. for (var c = 0; c < traits.length; c++) {
    1076. key = traits[c];
    1077. val = traits[r];
    1078. point = [set[key], set[val]];
    1079. index = species.indexOf(set.species);
    1080. series['g_' + r + '_' + c] = series['g_' + r + '_' + c] || [];
    1081. series['g_' + r + '_' + c][index] = series['g_' + r + '_' + c][index] || {};
    1082. series['g_' + r + '_' + c][index].text = set.species;
    1083. series['g_' + r + '_' + c][index].values = series['g_' + r + '_' + c][index].values || [];
    1084. series['g_' + r + '_' + c][index].values.push(point);
    1085. }
    1086. }
    1087. }
    1088.  
    1089. for (var r = 0; r < traits.length; r++) {
    1090. for (var c = 0; c < traits.length; c++) {
    1091. var gdata = {
    1092. width: 200,
    1093. height: 200,
    1094. x: 20 + c * 200,
    1095. y: (traits.length - 1 - r) * 200,
    1096. type: 'scatter',
    1097. plotarea: {
    1098. maskTolerance: [10, 10],
    1099. marginTop: 10,
    1100. marginRight: 10,
    1101. marginBottom: 10,
    1102. marginLeft: 10
    1103. },
    1104. scaleX: {
    1105. lineWidth: 0,
    1106. offset: 0,
    1107. item: {
    1108. fontSize: 10
    1109. },
    1110. guide: {
    1111. lineStyle: 'solid',
    1112. lineColor: '#bbb'
    1113. },
    1114. tick: {
    1115. lineColor: '#bbb'
    1116. }
    1117. },
    1118. scaleY: {
    1119. lineWidth: 0,
    1120. offset: 0,
    1121. minValue: 'auto',
    1122. item: {
    1123. fontSize: 10
    1124. },
    1125. guide: {
    1126. lineStyle: 'solid',
    1127. lineColor: '#bbb'
    1128. },
    1129. tick: {
    1130. lineColor: '#bbb'
    1131. }
    1132. },
    1133. plot: {
    1134. marker: {
    1135. borderWidth: 0,
    1136. size: 3.5,
    1137. alpha: 0.75
    1138. },
    1139. tooltipText: '%plot-text<br>[%scale-key-text, %scale-value-text]'
    1140. },
    1141. tooltip: {
    1142. fontSize: 15,
    1143. padding: 10
    1144. },
    1145. series: series['g_' + r + '_' + c]
    1146. };
    1147. if (c === r) {
    1148. gdata.title = {
    1149. text: traits[c],
    1150. fontSize: 10,
    1151. align: 'left',
    1152. padding: '15 20'
    1153. };
    1154. }
    1155. if (c > 0) {
    1156. gdata.scaleY.item.visible = false;
    1157. }
    1158. if (r > 0) {
    1159. gdata.scaleX.item.visible = false;
    1160. }
    1161. cdata.graphset.push(gdata);
    1162. }
    1163. }
    1164.  
    1165. zingchart.render({
    1166. id: 'zc',
    1167. width: traits.length * 200 + 20,
    1168. height: traits.length * 200 + 20,
    1169. output: 'svg',
    1170. data: cdata
    1171. });