Module: RCharts::GraphHelper::Axes::AxisElement::Styles
- Extended by:
- ActiveSupport::Concern
- Included in:
- RCharts::GraphHelper::Axes::AxisElement
- Defined in:
- app/helpers/rcharts/graph_helper/axes/axis_element/styles.rb
Overview
:nodoc:
Constant Summary collapse
- DEFAULT_BREAKPOINTS =
{ hiding: { even: 1.1, odd: 0.6 }, rotation: { half: 1.0, full: 0.9 } }.freeze
- ROTATION_CSS =
"@container (inline-size < calc(<%= min_row_characters %> * <%= half_rotation_breakpoint %>)) {\n .rcharts-chart .axis[data-name=\"x\"] {\n .axis-ticks[data-axis=\"<%= axis_id %>\"] .axis-tick-text {\n dominant-baseline: middle;\n rotate: -45deg;\n text-anchor: end;\n }\n .axis-ticks[data-axis=\"<%= axis_id %>\"] {\n height: calc(<%= max_label_characters %> * sin(45deg));\n }\n }\n}\n\n@container (inline-size < calc(<%= min_row_characters %> * <%= full_rotation_breakpoint %>)) {\n.rcharts-chart .axis[data-name=\"x\"] {\n .axis-ticks[data-axis=\"<%= axis_id %>\"] .axis-tick-text {\n rotate: -90deg;\n }\n .axis-ticks[data-axis=\"<%= axis_id %>\"] {\n height: <%= max_label_characters %>;\n }\n }\n}\n"- HIDING_CSS =
"@container (inline-size < calc(<%= tick_count %> * <%= even_hiding_breakpoint %>)) {\n .rcharts-chart .axis[data-name=\"x\"] {\n .axis-ticks[data-axis=\"<%= axis_id %>\"] .axis-tick:nth-child(even) .axis-tick-text {\n opacity: 0;\n }\n }\n}\n\n@container (inline-size < calc(<%= tick_count %> * <%= odd_hiding_breakpoint %>)) {\n .rcharts-chart .axis[data-name=\"x\"] {\n .axis-ticks[data-axis=\"<%= axis_id %>\"] .axis-tick:nth-child(4n + 3) .axis-tick-text {\n opacity: 0;\n }\n }\n}\n"