_charts.scss 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* ------------------------------------------------------------------------------
  2. *
  3. * # Chart styling
  4. *
  5. * Charts base - container and sizing setup
  6. *
  7. * ---------------------------------------------------------------------------- */
  8. // Check if component is enabled
  9. @if $enable-charts {
  10. // Container
  11. .chart-container {
  12. position: relative;
  13. width: 100%;
  14. // Add scroll
  15. &.has-scroll {
  16. overflow-x: scroll;
  17. overflow-y: visible;
  18. max-width: 100%;
  19. }
  20. // Add scroll for all charts on mobile to hide overflow
  21. @include media-breakpoint-down(sm) {
  22. overflow-x: scroll;
  23. overflow-y: visible;
  24. max-width: 100%;
  25. }
  26. }
  27. // Chart itself
  28. .chart {
  29. position: relative;
  30. display: block;
  31. width: 100%;
  32. @if $direction == 'RTL' {
  33. /*rtl:ignore*/
  34. direction: ltr;
  35. }
  36. // Give chart min width
  37. &.has-minimum-width {
  38. min-width: $chart-min-width;
  39. }
  40. }
  41. // Give chart fixed height
  42. .has-fixed-height {
  43. height: $chart-container-height;
  44. }
  45. // Pie charts
  46. .chart-pie {
  47. width: 100%;
  48. height: $chart-container-height;
  49. min-width: $chart-pie-min-width;
  50. }
  51. }