demopie.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  6. <meta name="description" content="Example showing how to use TChartJS">
  7. <meta name="author" content="silvioprog">
  8. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
  9. <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js" integrity="sha256-oSgtFCCmHWRPQ/JmR4OoZ3Xke1Pw4v50uh6pLcu+fIc=" crossorigin="anonymous"></script>
  10. <script src="js/demopie.js"></script>
  11. <title>TChartJS example</title>
  12. <style>
  13. .title {
  14. margin: 20px 0 20px 0
  15. }
  16. #canvas-holder {
  17. width: 100%;
  18. margin-top: 50px;
  19. text-align: center;
  20. }
  21. #chartjs-tooltip {
  22. opacity: 1;
  23. position: absolute;
  24. background: rgba(0, 0, 0, .7);
  25. color: white;
  26. border-radius: 3px;
  27. -webkit-transition: all .1s ease;
  28. transition: all .1s ease;
  29. pointer-events: none;
  30. -webkit-transform: translate(-50%, 0);
  31. transform: translate(-50%, 0);
  32. }
  33. .chartjs-tooltip-key {
  34. display: inline-block;
  35. width: 10px;
  36. height: 10px;
  37. margin-right: 10px;
  38. }
  39. </style>
  40. </head>
  41. <body>
  42. <div class="container">
  43. <h3 class="title">
  44. TChartJS <small class="text-muted">Create pie charts using Pas2JS & ChartJS (<a href="demopie.lpr">view source</a>)</small>
  45. </h3>
  46. <div id="canvas-holder" style="width: 300px;">
  47. <canvas id="chart-area" width="300" height="300"></canvas>
  48. <div id="chartjs-tooltip">
  49. <table></table>
  50. </div>
  51. </div>
  52. </div>
  53. <script>
  54. rtl.run();
  55. </script>
  56. </body>
  57. </html>