Guest User

Untitled

a guest
Feb 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.22 KB | None | 0 0
  1. // X and Y axis labels and captions default to global style if not provided
  2. // - X Axis Labels
  3. if (!this.settings.xAxisLabelColor) {
  4. this.settings.xAxisLabelColor = this.settings.labelColor;
  5. }
  6. if (!this.settings.xAxisLabelFont) {
  7. this.settings.xAxisLabelFont = this.settings.labelFont;
  8. }
  9. if (!this.settings.xAxisLabelFontSize) {
  10. this.settings.xAxisLabelFontSize = this.settings.labelFontSize;
  11. }
  12. // - Y Axis Labels
  13. if (!this.settings.yAxisLabelColor) {
  14. this.settings.yAxisLabelColor = this.settings.labelColor;
  15. }
  16. if (!this.settings.yAxisLabelFont) {
  17. this.settings.yAxisLabelFont = this.settings.labelFont;
  18. }
  19. if (!this.settings.yAxisLabelFontSize) {
  20. this.settings.yAxisLabelFontSize = this.settings.labelFontSize;
  21. }
  22. // - Y Axis Caption
  23. if (!this.settings.yAxisCaptionColor) {
  24. this.settings.yAxisCaptionColor = this.settings.labelColor;
  25. }
  26. if (!this.settings.yAxisCaptionFont) {
  27. this.settings.yAxisCaptionFont = this.settings.labelFont;
  28. }
  29. if (!this.settings.yAxisCaptionFontSize) {
  30. this.settings.yAxisCaptionFontSize = this.settings.labelFontSize;
  31. }
  32. // - Hover Labels - Labels from the X Axis that appear when hovering over points in the graph
  33. if (!this.settings.hoverLabelColor) {
  34. this.settings.hoverLabelColor = this.settings.labelColor;
  35. }
  36. if (!this.settings.hoverLabelFont) {
  37. this.settings.hoverLabelFont = this.settings.labelFont;
  38. }
  39. if (!this.settings.hoverLabelFontSize) {
  40. this.settings.hoverLabelFontSize = this.settings.labelFontSize;
  41. }
  42. // - Hover Values - Values from the Y Axis that appear when hovering over points in the graph
  43. if (!this.settings.hoverValueColor) {
  44. this.settings.hoverValueColor = this.settings.labelColor;
  45. }
  46. if (!this.settings.hoverValueFont) {
  47. this.settings.hoverValueFont = this.settings.labelFont;
  48. }
  49. if (!this.settings.hoverValueFontSize) {
  50. this.settings.hoverValueFontSize = this.settings.labelFontSize;
  51. }
  52. // Label Styles
  53. // - General
  54. this.labelStyle = {
  55. font: this.settings.labelFontSize + '"' + this.settings.labelFont + '"',
  56. fill: this.settings.labelColor
  57. };
  58. // - X Axis Labels
  59. this.xAxisLabelStyle = {
  60. font: this.settings.xAxisLabelFontSize + '"' + this.settings.xAxisLabelFont + '"',
  61. fill: this.settings.xAxisLabelColor
  62. };
  63. // - Y Axis Labels
  64. this.yAxisLabelStyle = {
  65. font: this.settings.yAxisLabelFontSize + '"' + this.settings.yAxisLabelFont + '"',
  66. fill: this.settings.yAxisLabelColor
  67. };
  68. // - Y Axis Caption
  69. this.yAxisCaptionStyle = {
  70. font: this.settings.yAxisCaptionFontSize + '"' + this.settings.yAxisCaptionFont + '"',
  71. fill: this.settings.yAxisCaptionColor
  72. };
  73. // - Hover Labels
  74. this.hoverLabelStyle = {
  75. font: this.settings.hoverLabelFontSize + '"' + this.settings.hoverLabelFont + '"',
  76. fill: this.settings.hoverLabelColor
  77. };
  78. // - Hover Values
  79. this.hoverValueStyle = {
  80. font: this.settings.hoverValueFontSize + '"' + this.settings.hoverValueFont + '"',
  81. fill: this.settings.hoverValueColor
  82. };
Add Comment
Please, Sign In to add comment