b576b4aef82af9cde1c9d9b03cd757099c9a97d5.svn-base 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. //차트 옵션 2020.08.**************** kgpark
  2. $(function () {
  3. "use strict";
  4. BWA.ChartOptions = BWA.ChartOptions || {};
  5. var C = BWA.ChartOptions.SimulatorIceStorage = BWA.ChartOptions.SimulatorIceStorage || {};
  6. var series = [{
  7. type: 'spline',
  8. pane: 'topPane',
  9. //axis: 'DayAhead',
  10. valueField: 'SimulationValue',
  11. visible: true, // 시리즈만 안보이게 할수 있다. 대신 그렇게 할려면 시작은 false로 해야 한다 hcLee 2015 04 25
  12. point: { size: 8 },
  13. color: '#8b33ff',
  14. name: '시뮬레이션 축열량'
  15. }];
  16. var ObservedSeries = [{
  17. type: 'bar',
  18. pane: 'topPane',
  19. valueField: 'ObservedValue',
  20. color: '#ccae1b',
  21. name: '실 계산 축열량'
  22. }];
  23. C.getSeriesOptions = function () {
  24. return {
  25. //palette: 'Carmine',
  26. valueAxis: {
  27. pane: 'topPane',
  28. title: {
  29. text: '축열량(%)'
  30. },
  31. grid: {
  32. visible: true,
  33. },
  34. showZero: true,
  35. },
  36. series: [ObservedSeries[0]].concat(series),
  37. argumentAxis: BWA.Chart.getTimeLineArgumentAxis(moment(), $Code.TimeType.QUARTERMIN),
  38. };
  39. };
  40. C.getChartOptions = function () {
  41. return {
  42. legend: {
  43. visible: true,
  44. verticalAlignment: 'top',
  45. horizontalAlignment: 'center',
  46. },
  47. argumentAxis: BWA.Chart.getTimeLineArgumentAxis(moment(), $Code.TimeType.QUARTERMIN),
  48. commonSeriesSettings: {
  49. argumentField: "DateTime",
  50. selectionStyle: {
  51. hatching: {
  52. direction: "right"
  53. }
  54. }
  55. },
  56. panes: [{
  57. name: 'topPane',
  58. border: {
  59. visible: false,
  60. left: false,
  61. right: false,
  62. top: false,
  63. color: 'gray'
  64. }
  65. }, ],
  66. defaultPane: "topPane",
  67. customizePoint: function () {
  68. },
  69. tooltip: {
  70. enabled: true,
  71. format: 'fixedPoint',
  72. precision: 2,
  73. shared: true,
  74. argumentFormat: 'shortDate',
  75. customizeTooltip: function (point) {
  76. return {
  77. text: "[" + point.argument.format("yy-MM-dd HH:mm") + "]" + "<br/>" + "<br/>" + point.valueText
  78. };
  79. }
  80. },
  81. crosshair: {
  82. enabled: true,
  83. width: 2,
  84. horizontalLine: {
  85. dashStyle: 'dash',
  86. visible: false
  87. },
  88. verticalLine: {
  89. dashStyle: 'dash',
  90. color: 'gray'
  91. },
  92. label: {
  93. visible: false,
  94. backgroundColor: "#949494",
  95. font: {
  96. color: "#fff",
  97. size: 12,
  98. }
  99. }
  100. }
  101. };
  102. };
  103. });