index.html 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533
  1. <!DOCTYPE html>
  2. <html lang="zh-TW">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  7. <meta name="description" content="">
  8. <meta name="author" content="">
  9. <title>Sanlih Entertainment Television</title>
  10. <!-- Custom fonts for this template-->
  11. <link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
  12. <link
  13. href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i"
  14. rel="stylesheet">
  15. <link href="vendor/datatables/dataTables.bootstrap4.min.css" rel="stylesheet">
  16. <!-- Custom styles for this template-->
  17. <link href="css/sb-admin-2.min.css" rel="stylesheet">
  18. <link href="css/custom.css" rel="stylesheet">
  19. </head>
  20. <body id="page-top">
  21. <!-- Page Wrapper -->
  22. <div id="wrapper">
  23. <!-- Sidebar -->
  24. <ul class="navbar-nav sidebar sidebar-dark accordion toggled d-none" id="accordionSidebar">
  25. <!-- Divider -->
  26. <hr class="sidebar-divider my-0">
  27. <!-- Nav Item - Dashboard -->
  28. <li class="nav-item active">
  29. <a class="nav-link p-0" href="index.html">
  30. <!-- <i class="fas fa-fw fa-tachometer-alt"></i> -->
  31. <!-- <span>Dashboard</span></a> -->
  32. </li>
  33. <!-- Divider -->
  34. <!-- <hr class="sidebar-divider d-none d-md-block"> -->
  35. <!-- Sidebar Toggler (Sidebar) -->
  36. <div class="text-center d-none">
  37. <button class="rounded-circle border-0" id="sidebarToggle"></button>
  38. </div>
  39. </ul>
  40. <!-- End of Sidebar -->
  41. <!-- Content Wrapper -->
  42. <div id="content-wrapper" class="d-flex flex-column">
  43. <!-- Main Content -->
  44. <div id="content">
  45. <!-- Topbar -->
  46. <nav class="navbar navbar-expand navbar-light bg-white topbar mb-2 static-top shadow">
  47. <!-- Sidebar - Brand -->
  48. <a class="sidebar-brand d-flex align-items-center justify-content-center" href="index.html">
  49. <div class="sidebar-brand-icon">
  50. <!-- <i class="fas fa-laugh-wink"></i> -->
  51. <img src="./img/iNEWS-logo.svg" width="120px" alt="">
  52. </div>
  53. <!-- <div class="sidebar-brand-text mx-3">TEXT-TO-CHART</div> -->
  54. </a>
  55. <!-- Sidebar Toggle (Topbar) -->
  56. <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
  57. <i class="fa fa-bars"></i>
  58. </button>
  59. <!-- Topbar Navbar -->
  60. <ul class="navbar-nav ml-auto">
  61. <!-- Nav Item - Search Dropdown (Visible Only XS) -->
  62. <li class="nav-item dropdown no-arrow d-sm-none">
  63. <a class="nav-link dropdown-toggle" href="#" id="searchDropdown" role="button"
  64. data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  65. <i class="fas fa-search fa-fw"></i>
  66. </a>
  67. <!-- Dropdown - Messages -->
  68. <div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-in"
  69. aria-labelledby="searchDropdown">
  70. <form class="form-inline mr-auto w-100 navbar-search">
  71. <div class="input-group">
  72. <input type="text" class="form-control bg-light border-0 small"
  73. placeholder="Search for..." aria-label="Search"
  74. aria-describedby="basic-addon2">
  75. <div class="input-group-append">
  76. <button class="btn btn-primary" type="button">
  77. <i class="fas fa-search fa-sm"></i>
  78. </button>
  79. </div>
  80. </div>
  81. </form>
  82. </div>
  83. </li>
  84. <li class="nav-item"><a class="nav-link" href="./knowledge-graph.html">knowledge-graph</a></li>
  85. <div class="topbar-divider d-sm-block"></div>
  86. <!-- Nav Item - User Information -->
  87. <li class="nav-item dropdown no-arrow">
  88. <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button"
  89. data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  90. <span class="mr-2 d-none d-lg-inline text-gray-600 small">User</span>
  91. <img class="img-profile rounded-circle" src="img/undraw_profile.svg">
  92. </a>
  93. </li>
  94. </ul>
  95. </nav>
  96. <!-- End of Topbar -->
  97. <!-- Begin Page Content -->
  98. <div class="container-fluid">
  99. <div class="row d-flex flex-wrap mb-4">
  100. <div class="col-xl-5 col-lg-5 chartSettingBox d-none">
  101. <div class="card shadow mb-4 h-100 pb-5">
  102. <div
  103. class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
  104. <h6 class="m-0 font-weight-bold text-primary">關鍵字輸入</h6>
  105. <div class="dropdown no-arrow">
  106. <a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink"
  107. data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  108. <i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i>
  109. </a>
  110. <div class="dropdown-menu dropdown-menu-right shadow animated--fade-in"
  111. aria-labelledby="dropdownMenuLink">
  112. <div class="dropdown-header">Dropdown Header:</div>
  113. <a class="dropdown-item" href="#">Action</a>
  114. <a class="dropdown-item" href="#">Another action</a>
  115. <div class="dropdown-divider"></div>
  116. <a class="dropdown-item" href="#">Something else here</a>
  117. </div>
  118. </div>
  119. </div>
  120. <div class="d-none d-sm-inline-block ml-md-3 mr-md-3 my-2 my-md-3 mw-100">
  121. </div>
  122. </div>
  123. </div>
  124. <div class="col-lg-8 mb-1">
  125. <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between border-0 py-0"
  126. style="background: none;">
  127. <h6 class="m-0 font-weight-bold text-primary d-none">圖表輸出</h6>
  128. <!-- <div class="text-center">
  129. <button id="downloadButton">下載圖表</button>
  130. </div> -->
  131. <!-- <div class="dropdown no-arrow">
  132. <a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink"
  133. data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  134. <i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i>
  135. </a>
  136. <div class="dropdown-menu dropdown-menu-right shadow animated--fade-in"
  137. aria-labelledby="dropdownMenuLink">
  138. <div class="dropdown-header">Dropdown Header:</div>
  139. </div>
  140. </div> -->
  141. </div>
  142. </div>
  143. <div class="col-xl-8 col-lg-8 chartSettingBox">
  144. <div class="card shadow mb-4 h-100">
  145. <!-- Card Header - Dropdown -->
  146. <!-- Card Body -->
  147. <div class="card-body chart_background p-0 chartSettingBox2">
  148. <div class="chart-area">
  149. <div id="chartDataLoading" class="h-100">
  150. <div class="d-flex justify-content-center align-items-center h-100">
  151. <div class="spinner-border" role="status">
  152. <span class="sr-only">Loading...</span>
  153. </div>
  154. </div>
  155. </div>
  156. <div class="chart_box">
  157. <div class="text-right">
  158. <button id="downloadButton">下載圖表</button>
  159. </div>
  160. <!-- <div id="legend" class="mt-3"></div> -->
  161. <div id="data_chart_box" class="chart_box2" style="position: relative;">
  162. <h2 class="chart_title"></h2>
  163. <div style="padding:0px 30px 30px;">
  164. <div id="data_chartJs_box"
  165. style="position: relative; height: auto; text-align: center;">
  166. <canvas id="textToChart"></canvas>
  167. <!-- <div id="chart-label"></div> -->
  168. <!-- <div class="chart-line" id="chart-line"></div> -->
  169. <div id="chartdiv"></div>
  170. </div>
  171. </div>
  172. <div id="img_box" class="img_box">
  173. <img id="img_box_url" src="" alt="">
  174. </div>
  175. </div>
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. </div>
  183. <!-- /.container-fluid -->
  184. <div id="fixed_button">
  185. <!-- <div> -->
  186. <div class="input-group">
  187. <input type="text" id="keyword_data" class="form-control bg-white small" placeholder="請輸入關鍵字..."
  188. aria-label="Search" aria-describedby="basic-addon2">
  189. <div id="suggestions" class="autocomplete-suggestions"></div>
  190. <div class="input-group-append">
  191. <button class="btn btn-primary" id="send_data" type="button">
  192. <!-- <i class="fas fa-search fa-sm"></i> -->
  193. 送出
  194. </button>
  195. </div>
  196. </div>
  197. <!-- </div> -->
  198. </div>
  199. </div>
  200. <!-- End of Main Content -->
  201. <!-- <div id="fixed_button">
  202. <div>
  203. <div class="input-group">
  204. <input type="text" id="keyword_data" class="form-control bg-white small" placeholder="請輸入關鍵字..."
  205. aria-label="Search" aria-describedby="basic-addon2">
  206. <div id="suggestions" class="autocomplete-suggestions"></div>
  207. <div class="input-group-append">
  208. <button class="btn btn-primary" id="send_data" type="button">
  209. 送出
  210. </button>
  211. </div>
  212. </div>
  213. </div>
  214. </div> -->
  215. <!-- Footer -->
  216. <!-- <footer class="sticky-footer bg-white">
  217. <div class="container my-auto">
  218. <div class="copyright text-center my-auto">
  219. <span>Copyright &copy; 2023</span>
  220. </div>
  221. </div>
  222. </footer> -->
  223. <!-- End of Footer -->
  224. </div>
  225. </div>
  226. <!-- Scroll to Top Button-->
  227. <a class="scroll-to-top rounded d-none" href="#page-top">
  228. <i class="fas fa-angle-up"></i>
  229. </a>
  230. <!-- 快捷功能 -->
  231. <div id="chart_seeting_button" class="setting_button">
  232. <div class="setting_button_content">
  233. <img src="./img/exchange.png" class="mb-2" width="20px" alt="">
  234. 快捷功能
  235. </div>
  236. </div>
  237. <!-- 快捷功能-表格 -->
  238. <!-- <div id="style_setting_table" class="card shadow hidden">
  239. <div class="text-right">
  240. <i id="style_setting_close_table" class="fa fa-times"></i>
  241. </div>
  242. <form class="ml-md-3 mr-md-3 my-2 chartSetting ">
  243. <p class="font-weight-bold">標題位置:</p>
  244. <input type="text" id="title_data" class="form-control bg-light small mb-3" placeholder="請輸入標題..."
  245. aria-label="Search" aria-describedby="basic-addon2">
  246. <div class="form-check form-check-inline">
  247. <input class="form-check-input" value="0" type="radio" name="inlineRadioOptions" id="inlineRadio1"
  248. value="option1" checked>
  249. <label class="form-check-label" for="inlineRadio1">置左</label>
  250. </div>
  251. <div class="form-check form-check-inline">
  252. <input class="form-check-input" value="1" type="radio" name="inlineRadioOptions" id="inlineRadio2"
  253. value="option2">
  254. <label class="form-check-label" for="inlineRadio2">置中</label>
  255. </div>
  256. <div class="form-check form-check-inline">
  257. <input class="form-check-input" value="2" type="radio" name="inlineRadioOptions" id="inlineRadio3"
  258. value="option2">
  259. <label class="form-check-label" for="inlineRadio3">置右</label>
  260. </div>
  261. </form>
  262. <form class="ml-md-3 mr-md-3 my-2 chartSetting d-flex">
  263. <div>
  264. <p class="font-weight-bold">字體大小:</p>
  265. <label class="d-none" for="table_fontSize">字體大小:</label>
  266. <input type="number" value="32" step="1" class="form-control" id="table_fontSize" />
  267. </div>
  268. </form>
  269. <form class="ml-md-3 mr-md-3 my-2 chartSetting">
  270. <p class="font-weight-bold">背景圖片:</p>
  271. <div class="d-flex">
  272. <img class="bgImg" src="./img/bg01.webp" width="80" height="60" alt="" value="./img/bg01.webp">
  273. <img class="bgImg ml-2" src="./img/bg02.webp" width="80" height="60" value="./img/bg02.webp" alt="">
  274. <img class="bgImg ml-2" src="./img/bg05.webp" width="80" height="60" value="./img/bg05.webp" alt="">
  275. <img class="bgImg ml-2" src="./img/bg.webp" width="80" height="60" value="./img/bg.webp" alt="">
  276. </div>
  277. <div class="d-flex mt-3">
  278. <img class="bgImg" src="./img/bg04.webp" width="80" height="60" value="./img/bg04.webp" alt="">
  279. </div>
  280. </form>
  281. <form class="ml-md-3 mr-md-3 my-2 chartSetting">
  282. <p class="font-weight-bold">場景圖片:</p>
  283. <select id="finance_options_table" class="form-control form-select" aria-label="Default select example">
  284. </select>
  285. </form>
  286. </div> -->
  287. <!-- 快捷功能-圖表 -->
  288. <div id="style_setting" class="card shadow hidden">
  289. <div class="text-right">
  290. <i id="style_setting_close" class="fa fa-times"></i>
  291. </div>
  292. <form id="chart_category" class="ml-md-3 mr-md-3 my-2 chartSetting d-none">
  293. <div>
  294. <p class="font-weight-bold">圖表類型:</p>
  295. <div class="form-check form-check-inline">
  296. <input class="form-check-input" type="radio" name="ChartOptions" id="inlineRadio4" value="line">
  297. <label class="form-check-label" for="inlineRadio4">折線圖</label>
  298. </div>
  299. <div class="form-check form-check-inline">
  300. <input class="form-check-input" type="radio" name="ChartOptions" id="inlineRadio5" value="bar">
  301. <label class="form-check-label" for="inlineRadio5">柱狀圖</label>
  302. </div>
  303. <!-- <div class="form-check form-check-inline">
  304. <input class="form-check-input" type="radio" name="ChartOptions" id="inlineRadio6" value="pie">
  305. <label class="form-check-label" for="inlineRadio6">圓餅圖</label>
  306. </div>
  307. <div class="form-check form-check-inline">
  308. <input class="form-check-input" type="radio" name="ChartOptions" id="inlineRadio7" value="table">
  309. <label class="form-check-label" for="inlineRadio7">表格</label>
  310. </div> -->
  311. </div>
  312. </form>
  313. <form class="ml-md-3 mr-md-3 my-2 chartSetting ">
  314. <p class="font-weight-bold">標題:</p>
  315. <input type="text" id="title_data" class="form-control bg-light small mb-3" placeholder="請輸入標題..."
  316. aria-label="Search" aria-describedby="basic-addon2">
  317. <p class="font-weight-bold">標題位置:</p>
  318. <div class="form-check form-check-inline">
  319. <input class="form-check-input" value="0" type="radio" name="inlineRadioOptions" id="inlineRadio1"
  320. value="option1" checked>
  321. <label class="form-check-label" for="inlineRadio1">置左</label>
  322. </div>
  323. <div class="form-check form-check-inline">
  324. <input class="form-check-input" value="1" type="radio" name="inlineRadioOptions" id="inlineRadio2"
  325. value="option2">
  326. <label class="form-check-label" for="inlineRadio2">置中</label>
  327. </div>
  328. <div class="form-check form-check-inline">
  329. <input class="form-check-input" value="2" type="radio" name="inlineRadioOptions" id="inlineRadio3"
  330. value="option2">
  331. <label class="form-check-label" for="inlineRadio3">置右</label>
  332. </div>
  333. </form>
  334. <form class="ml-md-3 mr-md-3 my-2">
  335. <div>
  336. <p class="font-weight-bold">標題字體大小:</p>
  337. <label class="d-none" for="TitlefontSize">字體大小:</label>
  338. <input type="number" value="32" step="1" class="form-control" id="TitlefontSize" />
  339. </div>
  340. </form>
  341. <form class="ml-md-3 mr-md-3 my-2 chartSetting d-none">
  342. <div>
  343. <p class="font-weight-bold">縱軸:</p>
  344. <input type="text" id="unit_data" class="form-control bg-light small mb-3" placeholder="請輸入單位..."
  345. aria-label="Search" aria-describedby="basic-addon2">
  346. </div>
  347. <div class="ml-4 d-flex">
  348. <div>
  349. <p class="font-weight-bold">圖表字體大小:</p>
  350. <label class="d-none" for="YfontSize">字體大小:</label>
  351. <input type="number" value="18" step="1" class="form-control" id="YfontSize" />
  352. </div>
  353. </div>
  354. </form>
  355. <form id="table_setting" class="ml-md-3 mr-md-3 my-2 chartSetting">
  356. <div>
  357. <p class="font-weight-bold">圖表字體大小:</p>
  358. <label class="d-none" for="table_fontSize">字體大小:</label>
  359. <input type="number" value="32" step="1" class="form-control" id="table_fontSize" />
  360. </div>
  361. </form>
  362. <div id="lineChartSetting">
  363. <form class="ml-md-3 mr-md-3 my-2 chartSetting">
  364. <p class="font-weight-bold">橫軸:</p>
  365. <label class="d-none" for="XfontSize">字體大小:</label>
  366. <input type="number" value="18" step="1" class="form-control" id="XfontSize" />
  367. </form>
  368. <form class="ml-md-3 mr-md-3 my-2 chartSetting">
  369. <div id="borderSetting" class="borderWidth d-flex">
  370. <div>
  371. <p class="font-weight-bold">線條粗細:</p>
  372. <label for="borderWidthRange" class="form-label d-none">線條粗細</label>
  373. <input type="range" class="form-range" id="borderWidthRange" min="1" max="5" value="1" step="1">
  374. <span id="borderWidthRangeValue">1</span>
  375. </div>
  376. <div class="ml-lg-5">
  377. <p style="margin-bottom: 10px;" class="font-weight-bold">線條顏色:</p>
  378. <label for="exampleColorInput" class="form-label d-none">線條顏色</label>
  379. <input type="color" class="form-control form-control-color" id="borderColorInput"
  380. value="#912B2B" title="Choose your color">
  381. </div>
  382. </div>
  383. <div>
  384. </div>
  385. <input type="checkbox" id="togglePoints"> 顯示數據點
  386. </form>
  387. </div>
  388. <div id="barChartSetting">
  389. <form class="ml-md-3 mr-md-3 my-2 chartSetting">
  390. <p class="font-weight-bold">橫軸字體大小:</p>
  391. <label class="d-none" for="XfontSize">字體大小:</label>
  392. <input type="number" value="14" step="1" class="form-control" id="XfontSizeBar" />
  393. </form>
  394. <form class="ml-md-3 mr-md-3 my-2 chartSetting">
  395. <p class="font-weight-bold">縱軸字體大小:</p>
  396. <label class="d-none" for="XfontSize">字體大小:</label>
  397. <input type="number" value="14" step="1" class="form-control" id="YfontSizeBar" />
  398. </form>
  399. <form class="ml-md-3 mr-md-3 my-2 chartSetting">
  400. <div id="borderSetting" class="borderWidth d-flex">
  401. <div>
  402. <p style="margin-bottom: 10px;" class="font-weight-bold">柱狀顏色:</p>
  403. <label for="exampleColorInput" class="form-label d-none">線條顏色</label>
  404. <input type="color" class="form-control form-control-color" id="borderColorInputBar"
  405. value="#288D97" title="Choose your color">
  406. </div>
  407. </div>
  408. <div>
  409. </div>
  410. </form>
  411. </div>
  412. <form class="ml-md-3 mr-md-3 my-2 chartSetting">
  413. <p class="font-weight-bold">背景圖片:</p>
  414. <div class="d-flex">
  415. <img class="bgImg" src="./img/bg01.webp" width="80" height="60" alt="" value="./img/bg01.webp">
  416. <img class="bgImg ml-2" src="./img/bg02.webp" width="80" height="60" value="./img/bg02.webp" alt="">
  417. <img class="bgImg ml-2" src="./img/bg05.webp" width="80" height="60" value="./img/bg05.webp" alt="">
  418. <img class="bgImg ml-2" src="./img/bg.webp" width="80" height="60" value="./img/bg.webp" alt="">
  419. </div>
  420. <div class="d-flex mt-3">
  421. <img class="bgImg" src="./img/bg04.webp" width="80" height="60" value="./img/bg04.webp" alt="">
  422. </div>
  423. </form>
  424. <form class="ml-md-3 mr-md-3 my-2 chartSetting">
  425. <p class="font-weight-bold">場景圖片:</p>
  426. <select id="finance_options" class="form-control form-select" aria-label="Default select example">
  427. </select>
  428. </form>
  429. </div>
  430. <div style="height:300px">
  431. </div>
  432. <!-- Bootstrap core JavaScript-->
  433. <script src="./vendor/jquery/jquery.min.js"></script>
  434. <script src="./vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
  435. <!-- Core plugin JavaScript-->
  436. <script src="./vendor/jquery-easing/jquery.easing.min.js"></script>
  437. <!-- Custom scripts for all pages-->
  438. <script src="./js/sb-admin-2.min.js"></script>
  439. <!-- Page level plugins -->
  440. <!-- <script src="vendor/chart.js/Chart.min.js"></script> -->
  441. <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
  442. <script src="https://cdn.jsdelivr.net/npm/chart.js@3.0.0/dist/chart.min.js"></script>
  443. <script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-3d@1.0.0-beta.2/dist/chartjs-plugin-3d.min.js"></script>
  444. <script src="https://cdn.jsdelivr.net/npm/chartjs-plugin-datalabels@2.0.0"></script>
  445. <!-- Page level custom scripts -->
  446. <script src="./vendor/datatables/jquery.dataTables.min.js"></script>
  447. <script src="./vendor/datatables/dataTables.bootstrap4.min.js"></script>
  448. <!-- amcharts -->
  449. <script src="https://cdn.amcharts.com/lib/4/core.js"></script>
  450. <script src="https://cdn.amcharts.com/lib/4/charts.js"></script>
  451. <script src="https://cdn.amcharts.com/lib/4/themes/animated.js"></script>
  452. <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
  453. <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
  454. <script src="./js/demo/text-to-chart.js"></script>
  455. </body>
  456. </html>