chart_stanford.html 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <html>
  2. <head>
  3. <meta charset="utf-8">
  4. <link rel="stylesheet" type="text/css" href="../css/c3.css">
  5. </head>
  6. <body>
  7. <div id="chart"></div>
  8. <script src="https://d3js.org/d3.v5.min.js" charset="utf-8"></script>
  9. <script src="../js/c3.js"></script>
  10. <script>
  11. var chart = c3.generate({
  12. size: {
  13. height: 600,
  14. width: 600 * 1.12
  15. },
  16. data: {
  17. url: '/data/c3_stanford_data.json',
  18. mimeType: 'json',
  19. keys: {
  20. x: 'HPE',
  21. value: ['HPL', 'epochs']
  22. },
  23. type: 'stanford'
  24. },
  25. legend: {
  26. hide: true
  27. },
  28. point: {
  29. focus: {
  30. expand: {
  31. r: 5
  32. }
  33. },
  34. r: 2.5
  35. },
  36. axis: {
  37. x: {
  38. show: true,
  39. label: {
  40. text: 'HPE (m)',
  41. position: 'outer-center'
  42. },
  43. min: 0,
  44. max: 61,
  45. tick: {
  46. values: d3.range(0, 65, 10)
  47. },
  48. padding: {
  49. top: 0,
  50. bottom: 0,
  51. left: 0,
  52. right: 0
  53. },
  54. },
  55. y: {
  56. show: true,
  57. label: {
  58. text: 'HPL (m)',
  59. position: 'outer-middle'
  60. },
  61. min: 0,
  62. max: 60,
  63. tick: {
  64. values: d3.range(0, 65, 10)
  65. },
  66. padding: {
  67. top: 5,
  68. bottom: 0,
  69. left: 0,
  70. right: 0
  71. },
  72. }
  73. },
  74. stanford: {
  75. scaleMin: 1,
  76. scaleMax: 10000,
  77. scaleFormat: 'pow10',
  78. padding: {
  79. top: 15,
  80. right: 0,
  81. bottom: 0,
  82. left: 0
  83. }
  84. }
  85. });
  86. </script>
  87. </body>
  88. </html>