fms-dashboard-task-chart-options.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. $(function () {
  2. BWA.ChartOptions = BWA.ChartOptions || {};
  3. var seriesBudgetCode;
  4. BWA.ChartOptions.MainDashboardFMS = {
  5. getPieChartDayOptions: function () {
  6. return _.extend({
  7. palette: "Pastel",
  8. }, BWA.ChartOptions.MainDashboardFMS.getPieChartOptions());
  9. },
  10. getPieChartOptions: function () {
  11. return {
  12. legend: {
  13. horizontalAlignment: "right",
  14. verticalAlignment: "top",
  15. margin: 2,
  16. border: {
  17. visible: true
  18. }
  19. },
  20. tooltip: {
  21. enabled: true,
  22. format: 'fixedPoint',
  23. precision: 0,
  24. customizeTooltip: function (point) {
  25. return {
  26. text: [this.argumentText, ': ', this.valueText].join('')
  27. };
  28. }
  29. },
  30. series: [
  31. {
  32. type: "doughnut", // if not, pie.
  33. argumentField: "FuelTypeName",
  34. argumentType: "string",
  35. valueField: "Value",
  36. hoverStyle: {
  37. color: "#ffd700"
  38. },
  39. label: {
  40. visible: false,
  41. connector: {
  42. visible: true
  43. },
  44. customizeText: function (pointInfo) {
  45. return pointInfo.argumentText;
  46. }
  47. }
  48. }
  49. ]
  50. };
  51. }
  52. };
  53. });