area-chart.less 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. @import './area-chart-vars.less';
  2. .area-chart {
  3. position: relative;
  4. svg {
  5. display: block;
  6. width: 100%;
  7. font-size: 0;
  8. height: auto;
  9. margin: 0 auto;
  10. }
  11. path {
  12. fill: none;
  13. stroke-width: var(--f7-area-chart-line-stroke-width);
  14. }
  15. &-current-line {
  16. stroke: var(--f7-area-chart-current-line-stroke);
  17. stroke-width: var(--f7-area-chart-current-line-stroke-width);
  18. }
  19. &-axis {
  20. height: var(--f7-area-chart-axis-height);
  21. background: var(--f7-area-chart-axis-bg-color);
  22. color: var(--f7-area-chart-axis-text-color);
  23. display: flex;
  24. font-size: var(--f7-area-chart-axis-font-size);
  25. font-weight: var(--f7-area-chart-axis-font-weight);
  26. justify-content: space-between;
  27. line-height: 1;
  28. margin-bottom: 2em;
  29. > span {
  30. padding-top: 10px;
  31. width: 0;
  32. display: flex;
  33. align-items: flex-start;
  34. justify-content: center;
  35. white-space: nowrap;
  36. &:first-child {
  37. justify-content: flex-start;
  38. }
  39. &:last-child {
  40. justify-content: flex-end;
  41. }
  42. }
  43. }
  44. &-tooltip {
  45. pointer-events: none;
  46. text-align: left;
  47. font-size: var(--f7-area-chart-tooltip-font-size);
  48. line-height: 1.4;
  49. &-label {
  50. color: var(--f7-area-chart-tooltip-total-label-text-color);
  51. }
  52. &-total {
  53. font-size: var(--f7-area-chart-tooltip-total-font-size);
  54. font-weight: var(--f7-area-chart-tooltip-total-font-weight);
  55. }
  56. &-list {
  57. list-style: none;
  58. margin: 0;
  59. padding: 0;
  60. li {
  61. white-space: nowrap;
  62. }
  63. span {
  64. display: inline-block;
  65. width: var(--f7-area-chart-tooltip-color-size);
  66. height: var(--f7-area-chart-tooltip-color-size);
  67. border-radius: 50%;
  68. margin-right: 4px;
  69. }
  70. }
  71. }
  72. &-axis ~ &-legend {
  73. margin-top: 2em;
  74. }
  75. &-legend {
  76. display: flex;
  77. flex-wrap: wrap;
  78. align-items: center;
  79. justify-content: center;
  80. font-size: var(--f7-area-chart-legend-font-size);
  81. width: 100%;
  82. margin-top: 1em;
  83. &-button {
  84. -webkit-appearance: none !important;
  85. appearance: none !important;
  86. background-color: transparent;
  87. border-radius: 0;
  88. border: none;
  89. outline: 0 !important;
  90. cursor: pointer;
  91. font-family: inherit;
  92. font-size: inherit;
  93. box-shadow: none !important;
  94. }
  95. &-item {
  96. position: relative;
  97. color: var(--f7-area-chart-legend-text-color);
  98. width: auto;
  99. display: flex;
  100. align-items: center;
  101. font-weight: var(--f7-area-chart-legend-font-weight);
  102. transition-duration: 200ms;
  103. padding: var(--f7-area-chart-legend-padding);
  104. border-radius: var(--f7-area-chart-legend-border-radius);
  105. overflow: hidden;
  106. span {
  107. width: var(--f7-area-chart-legend-color-size);
  108. height: var(--f7-area-chart-legend-color-size);
  109. margin-right: 4px;
  110. border-radius: 50%;
  111. transition-duration: 200ms;
  112. }
  113. &-hidden {
  114. color: var(--f7-area-chart-legend-disabled-text-color);
  115. span {
  116. background-color: var(--f7-area-chart-legend-disabled-text-color) !important;
  117. }
  118. }
  119. }
  120. }
  121. }
  122. .if-ios-theme({
  123. @import './area-chart-ios.less';
  124. });
  125. .if-md-theme({
  126. @import './area-chart-md.less';
  127. });
  128. .if-aurora-theme({
  129. @import './area-chart-aurora.less';
  130. });