15638cf45f3d4958f27837f87992b22959e92b47.svn-base 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. $(function() {
  2. "use strict";
  3. BWA.ChartOptions = BWA.ChartOptions || {};
  4. var A = BWA.ChartOptions.MainDashBoard = BWA.ChartOptions.MainDashBoard || {};
  5. A.getMonthEnergyUsageStatusSeriesOptions = function(flags) {
  6. var series = [];
  7. if (flags.thisMonth) {
  8. series.push({
  9. color: '#5F8B95',
  10. valueField: 'ThisMonthValue', name: '금월', point: { size: 8 }
  11. });
  12. }
  13. if (flags.lastMonth) {
  14. series.push({
  15. color: '#BD5458',
  16. valueField: 'LastMonthValue', name: '전월', point: { size: 8 }
  17. });
  18. }
  19. if (flags.lastYear) {
  20. series.push({
  21. color: '#B0C677',
  22. valueField: 'LastYearValue', name: '전년동월', point: { size: 8 }
  23. });
  24. }
  25. return series;
  26. };
  27. A.getMonthEnergyUsageStatusChartOptions = function() {
  28. return {
  29. palette: 'Pastel',
  30. commonSeriesSettings: {
  31. type: 'line',
  32. argumentField: 'DateTime'
  33. },
  34. series: [
  35. { valueField: 'Value', name: '' },
  36. ],
  37. argumentAxis: {
  38. label: {
  39. customizeText: function() {
  40. return this.value + '일';
  41. }
  42. },
  43. min: 1,
  44. max: 31,
  45. valueMarginsEnabled: false,
  46. tickInterval: 5,
  47. },
  48. valueAxis: {
  49. label: {
  50. format: 'largeNumber',
  51. },
  52. showZero: true
  53. },
  54. tooltip: {
  55. enabled: true,
  56. customizeTooltip: function(point) {
  57. return {
  58. text: '[{0}] {1}{2}: {3}'.formati(point.seriesName, point.argumentText, '일', point.value)
  59. };
  60. }
  61. },
  62. legend: {
  63. visible: false,
  64. // position: 'inside',
  65. verticalAlignment: "top",
  66. horizontalAlignment: "right",
  67. border: {
  68. visible: true
  69. }
  70. }
  71. };
  72. };
  73. });