CaseProgress.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. import React, { Component, useState, useEffect } from 'react';
  2. import { Button } from "reactstrap";
  3. import { Progress } from "reactstrap";
  4. import Sparkline from "@/components/Common/Sparklines";
  5. import { Container, Row, Col, Card, CardHeader, CardBody } from 'reactstrap';
  6. import FlotChart from '@/components/Charts/Flot.js';
  7. import { ChartSpline, ChartArea, ChartBarStacked, ChartDonut, ChartLine } from '@/components/Config/flot.setup.js';
  8. import Datatable from "@/components/Tables/Datatable";
  9. import MorrisChart from '@/components/Charts//Morris';
  10. const ChartPie = {
  11. data: [{
  12. "label": "Ditindaklanjuti DIKTI",
  13. "color": "#287DAD",
  14. "data": 70
  15. }, {
  16. "label": "Ditindaklanjuti LLDIKTI",
  17. "color": "#52D489",
  18. "data": 40
  19. }, {
  20. "label": "Ditutup",
  21. "color": "#FD4233",
  22. "data": 40
  23. }],
  24. options: {
  25. series: {
  26. pie: {
  27. show: true,
  28. innerRadius: 0,
  29. label: {
  30. show: true,
  31. radius: 0.8,
  32. formatter: function (label, series) {
  33. return '<div class="flot-pie-label">' +
  34. //label + ' : ' +
  35. Math.round(series.percent) +
  36. '%</div>';
  37. },
  38. background: {
  39. opacity: 0.8,
  40. color: '#222'
  41. }
  42. }
  43. }
  44. }
  45. }
  46. }
  47. const ChartBar = {
  48. data: [{
  49. // "label": "Complete",
  50. "color": "#5ab1ef",
  51. "data": [
  52. ["Ditindaklanjuti DIKTI", 111]
  53. ]
  54. }, {
  55. // "label": "In Progress",
  56. "color": "#f5994e",
  57. "data": [
  58. ["Ditindaklanjuti LLDIKTI", 79]
  59. ]
  60. }, {
  61. // "label": "Cancelled",
  62. "color": "#d87a80",
  63. "data": [
  64. ["Ditutup", 41]
  65. ]
  66. }],
  67. options: {
  68. series: {
  69. bars: {
  70. align: 'center',
  71. lineWidth: 0,
  72. show: true,
  73. barWidth: 0.2,
  74. fill: 0.9
  75. }
  76. },
  77. grid: {
  78. borderColor: '#eee',
  79. borderWidth: 1,
  80. hoverable: true,
  81. backgroundColor: '#fcfcfc'
  82. },
  83. tooltip: true,
  84. tooltipOpts: {
  85. content: (label, x, y) => x + ' : ' + y
  86. },
  87. xaxis: {
  88. tickColor: '#fcfcfc',
  89. mode: 'categories'
  90. },
  91. yaxis: {
  92. // position: 'right' or 'left'
  93. tickColor: '#eee'
  94. },
  95. shadowSize: 0
  96. }
  97. }
  98. function CaseProgress() {
  99. return (
  100. <div className="card b">
  101. <div className="card-body bb">
  102. <div className="margin-botton-20 text-tahun">
  103. <Button className="float-left button-hidden icon-next">
  104. <img src="/static/img/previous.png"></img>
  105. </Button>
  106. <Button className="float-left button-hidden icon-next">
  107. <img src="/static/img/next.png"></img>
  108. </Button>
  109. <b className="text-tahun">Tahun 2022 </b>
  110. <Button className="float-right button-hidden icon-eksport">
  111. <img src="/static/img/Eksport.png"></img>
  112. </Button>
  113. </div>
  114. <div className="header-1">
  115. <h2 className="card-title-1">Perkembangan</h2>
  116. </div >
  117. <div className="w-401">
  118. <FlotChart options={ChartBar.options} data={ChartBar.data} className="flot-chart" height="200px" />
  119. {/* <MorrisChart type={'Bar'} id="morris-bar" data={chartdata} options={barOptions} /> */}
  120. </div>
  121. </div>
  122. <div className="card-body">
  123. <div className="header-1">
  124. <h2 className="card-title-1">Rekapitulasi</h2>
  125. </div>
  126. <FlotChart options={ChartPie.options} data={ChartPie.data} className="flot-chart" height="250px" />
  127. </div>
  128. </div >
  129. );
  130. }
  131. export default CaseProgress;