@elastic/charts 69.0.1 → 69.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chart_types/bullet_graph/chart_state.js +20 -23
- package/dist/chart_types/bullet_graph/chart_state.js.map +1 -1
- package/dist/chart_types/bullet_graph/renderer/canvas/bullet.js +2 -3
- package/dist/chart_types/bullet_graph/renderer/canvas/bullet.js.map +1 -1
- package/dist/chart_types/bullet_graph/renderer/canvas/index.js +6 -4
- package/dist/chart_types/bullet_graph/renderer/canvas/index.js.map +1 -1
- package/dist/chart_types/bullet_graph/renderer/canvas/sub_types/angular.js +1 -1
- package/dist/chart_types/bullet_graph/renderer/canvas/sub_types/angular.js.map +1 -1
- package/dist/chart_types/bullet_graph/renderer/canvas/sub_types/horizontal.js +1 -2
- package/dist/chart_types/bullet_graph/renderer/canvas/sub_types/horizontal.js.map +1 -1
- package/dist/chart_types/bullet_graph/renderer/canvas/sub_types/vertical.js +1 -2
- package/dist/chart_types/bullet_graph/renderer/canvas/sub_types/vertical.js.map +1 -1
- package/dist/chart_types/bullet_graph/selectors/can_display_chart_titles.js +1 -2
- package/dist/chart_types/bullet_graph/selectors/can_display_chart_titles.js.map +1 -1
- package/dist/chart_types/bullet_graph/selectors/get_active_value.js +1 -2
- package/dist/chart_types/bullet_graph/selectors/get_active_value.js.map +1 -1
- package/dist/chart_types/bullet_graph/selectors/get_bullet_spec.js +3 -3
- package/dist/chart_types/bullet_graph/selectors/get_bullet_spec.js.map +1 -1
- package/dist/chart_types/bullet_graph/selectors/get_debug_state.js +1 -1
- package/dist/chart_types/bullet_graph/selectors/get_debug_state.js.map +1 -1
- package/dist/chart_types/bullet_graph/selectors/get_layout.js +8 -10
- package/dist/chart_types/bullet_graph/selectors/get_layout.js.map +1 -1
- package/dist/chart_types/bullet_graph/selectors/get_panel_dimensions.js +3 -3
- package/dist/chart_types/bullet_graph/selectors/get_panel_dimensions.js.map +1 -1
- package/dist/chart_types/bullet_graph/selectors/get_tooltip_anchor.js +2 -3
- package/dist/chart_types/bullet_graph/selectors/get_tooltip_anchor.js.map +1 -1
- package/dist/chart_types/bullet_graph/selectors/is_tooltip_visible.js +1 -2
- package/dist/chart_types/bullet_graph/selectors/is_tooltip_visible.js.map +1 -1
- package/dist/chart_types/bullet_graph/spec.d.ts +8 -8
- package/dist/chart_types/bullet_graph/spec.d.ts.map +1 -1
- package/dist/chart_types/bullet_graph/spec.js +2 -2
- package/dist/chart_types/bullet_graph/spec.js.map +1 -1
- package/dist/chart_types/bullet_graph/theme.d.ts +3 -3
- package/dist/chart_types/bullet_graph/theme.d.ts.map +1 -1
- package/dist/chart_types/bullet_graph/utils/angular.js +2 -4
- package/dist/chart_types/bullet_graph/utils/angular.js.map +1 -1
- package/dist/chart_types/bullet_graph/utils/bounds.d.ts +1 -1
- package/dist/chart_types/bullet_graph/utils/bounds.d.ts.map +1 -1
- package/dist/chart_types/bullet_graph/utils/color.d.ts +3 -3
- package/dist/chart_types/bullet_graph/utils/color.d.ts.map +1 -1
- package/dist/chart_types/bullet_graph/utils/color.js +5 -7
- package/dist/chart_types/bullet_graph/utils/color.js.map +1 -1
- package/dist/chart_types/flame_chart/flame_api.d.ts +7 -6
- package/dist/chart_types/flame_chart/flame_api.d.ts.map +1 -1
- package/dist/chart_types/flame_chart/flame_api.js +2 -2
- package/dist/chart_types/flame_chart/flame_api.js.map +1 -1
- package/dist/chart_types/flame_chart/flame_chart.js +741 -748
- package/dist/chart_types/flame_chart/flame_chart.js.map +1 -1
- package/dist/chart_types/flame_chart/internal_chart_state.js +22 -22
- package/dist/chart_types/flame_chart/internal_chart_state.js.map +1 -1
- package/dist/chart_types/flame_chart/navigation.js +18 -20
- package/dist/chart_types/flame_chart/navigation.js.map +1 -1
- package/dist/chart_types/flame_chart/render/draw_canvas.js +1 -2
- package/dist/chart_types/flame_chart/render/draw_canvas.js.map +1 -1
- package/dist/chart_types/flame_chart/render/ensure_webgl.js.map +1 -1
- package/dist/chart_types/goal_chart/layout/types/viewmodel_types.js +4 -4
- package/dist/chart_types/goal_chart/layout/viewmodel/geoms.js +27 -2
- package/dist/chart_types/goal_chart/layout/viewmodel/geoms.js.map +1 -1
- package/dist/chart_types/goal_chart/layout/viewmodel/viewmodel.js +2 -2
- package/dist/chart_types/goal_chart/layout/viewmodel/viewmodel.js.map +1 -1
- package/dist/chart_types/goal_chart/renderer/canvas/connected_component.js +3 -1
- package/dist/chart_types/goal_chart/renderer/canvas/connected_component.js.map +1 -1
- package/dist/chart_types/goal_chart/specs/constants.d.ts +1 -1
- package/dist/chart_types/goal_chart/specs/constants.d.ts.map +1 -1
- package/dist/chart_types/goal_chart/specs/index.d.ts +8 -8
- package/dist/chart_types/goal_chart/specs/index.d.ts.map +1 -1
- package/dist/chart_types/goal_chart/specs/index.js +4 -5
- package/dist/chart_types/goal_chart/specs/index.js.map +1 -1
- package/dist/chart_types/goal_chart/state/chart_state.js +10 -8
- package/dist/chart_types/goal_chart/state/chart_state.js.map +1 -1
- package/dist/chart_types/goal_chart/state/selectors/geometries.js +3 -3
- package/dist/chart_types/goal_chart/state/selectors/geometries.js.map +1 -1
- package/dist/chart_types/goal_chart/state/selectors/get_chart_type_description.js +1 -2
- package/dist/chart_types/goal_chart/state/selectors/get_chart_type_description.js.map +1 -1
- package/dist/chart_types/goal_chart/state/selectors/get_goal_chart_data.js +1 -2
- package/dist/chart_types/goal_chart/state/selectors/get_goal_chart_data.js.map +1 -1
- package/dist/chart_types/goal_chart/state/selectors/get_goal_spec.js +3 -3
- package/dist/chart_types/goal_chart/state/selectors/get_goal_spec.js.map +1 -1
- package/dist/chart_types/goal_chart/state/selectors/on_element_click_caller.js.map +1 -1
- package/dist/chart_types/goal_chart/state/selectors/picked_shapes.js.map +1 -1
- package/dist/chart_types/goal_chart/state/selectors/tooltip.js +3 -6
- package/dist/chart_types/goal_chart/state/selectors/tooltip.js.map +1 -1
- package/dist/chart_types/heatmap/layout/types/viewmodel_types.d.ts +4 -4
- package/dist/chart_types/heatmap/layout/types/viewmodel_types.d.ts.map +1 -1
- package/dist/chart_types/heatmap/layout/viewmodel/viewmodel.d.ts +2 -2
- package/dist/chart_types/heatmap/layout/viewmodel/viewmodel.d.ts.map +1 -1
- package/dist/chart_types/heatmap/layout/viewmodel/viewmodel.js +39 -41
- package/dist/chart_types/heatmap/layout/viewmodel/viewmodel.js.map +1 -1
- package/dist/chart_types/heatmap/renderer/canvas/canvas_renderers.js +6 -4
- package/dist/chart_types/heatmap/renderer/canvas/canvas_renderers.js.map +1 -1
- package/dist/chart_types/heatmap/renderer/canvas/connected_component.js +7 -7
- package/dist/chart_types/heatmap/renderer/canvas/connected_component.js.map +1 -1
- package/dist/chart_types/heatmap/renderer/canvas/debug.d.ts.map +1 -0
- package/dist/chart_types/heatmap/renderer/canvas/debug.js +67 -0
- package/dist/chart_types/heatmap/renderer/canvas/debug.js.map +1 -0
- package/dist/chart_types/heatmap/renderer/dom/cursor_band.js +3 -4
- package/dist/chart_types/heatmap/renderer/dom/cursor_band.js.map +1 -1
- package/dist/chart_types/heatmap/renderer/dom/highlighter.js +6 -10
- package/dist/chart_types/heatmap/renderer/dom/highlighter.js.map +1 -1
- package/dist/chart_types/heatmap/renderer/dom/highlighter_brush.js +9 -2
- package/dist/chart_types/heatmap/renderer/dom/highlighter_brush.js.map +1 -1
- package/dist/chart_types/heatmap/scales/band_color_scale.js +3 -5
- package/dist/chart_types/heatmap/scales/band_color_scale.js.map +1 -1
- package/dist/chart_types/heatmap/specs/heatmap.d.ts +13 -12
- package/dist/chart_types/heatmap/specs/heatmap.d.ts.map +1 -1
- package/dist/chart_types/heatmap/specs/heatmap.js +4 -4
- package/dist/chart_types/heatmap/specs/heatmap.js.map +1 -1
- package/dist/chart_types/heatmap/state/chart_state.js +9 -11
- package/dist/chart_types/heatmap/state/chart_state.js.map +1 -1
- package/dist/chart_types/heatmap/state/selectors/compute_axes_sizes.js +9 -13
- package/dist/chart_types/heatmap/state/selectors/compute_axes_sizes.js.map +1 -1
- package/dist/chart_types/heatmap/state/selectors/compute_chart_dimensions.js +16 -8
- package/dist/chart_types/heatmap/state/selectors/compute_chart_dimensions.js.map +1 -1
- package/dist/chart_types/heatmap/state/selectors/get_brush_area.js +3 -3
- package/dist/chart_types/heatmap/state/selectors/get_brush_area.js.map +1 -1
- package/dist/chart_types/heatmap/state/selectors/get_debug_state.js +11 -14
- package/dist/chart_types/heatmap/state/selectors/get_debug_state.js.map +1 -1
- package/dist/chart_types/heatmap/state/selectors/get_heatmap_container_size.js +1 -1
- package/dist/chart_types/heatmap/state/selectors/get_heatmap_container_size.js.map +1 -1
- package/dist/chart_types/heatmap/state/selectors/get_heatmap_spec.js +3 -3
- package/dist/chart_types/heatmap/state/selectors/get_heatmap_spec.js.map +1 -1
- package/dist/chart_types/heatmap/state/selectors/get_heatmap_table.js +6 -8
- package/dist/chart_types/heatmap/state/selectors/get_heatmap_table.js.map +1 -1
- package/dist/chart_types/heatmap/state/selectors/get_legend_items_labels.js +1 -2
- package/dist/chart_types/heatmap/state/selectors/get_legend_items_labels.js.map +1 -1
- package/dist/chart_types/heatmap/state/selectors/get_per_panel_heatmap_geometries.js.map +1 -1
- package/dist/chart_types/heatmap/state/selectors/get_tooltip_anchor.js +2 -2
- package/dist/chart_types/heatmap/state/selectors/get_tooltip_anchor.js.map +1 -1
- package/dist/chart_types/heatmap/state/selectors/on_brush_end_caller.js.map +1 -1
- package/dist/chart_types/heatmap/state/selectors/on_element_click_caller.js +2 -2
- package/dist/chart_types/heatmap/state/selectors/on_element_click_caller.js.map +1 -1
- package/dist/chart_types/heatmap/state/selectors/on_element_over_caller.js.map +1 -1
- package/dist/chart_types/heatmap/state/selectors/on_pointer_update_caller.js +3 -3
- package/dist/chart_types/heatmap/state/selectors/on_pointer_update_caller.js.map +1 -1
- package/dist/chart_types/heatmap/state/selectors/tooltip.js +1 -2
- package/dist/chart_types/heatmap/state/selectors/tooltip.js.map +1 -1
- package/dist/chart_types/heatmap/state/utils/axis.js +7 -10
- package/dist/chart_types/heatmap/state/utils/axis.js.map +1 -1
- package/dist/chart_types/index.d.ts +1 -1
- package/dist/chart_types/index.d.ts.map +1 -1
- package/dist/chart_types/metric/renderer/dom/index.js.map +1 -1
- package/dist/chart_types/metric/renderer/dom/metric.js +1 -1
- package/dist/chart_types/metric/renderer/dom/metric.js.map +1 -1
- package/dist/chart_types/metric/renderer/dom/progress.js +1 -1
- package/dist/chart_types/metric/renderer/dom/progress.js.map +1 -1
- package/dist/chart_types/metric/renderer/dom/sparkline.js +3 -4
- package/dist/chart_types/metric/renderer/dom/sparkline.js.map +1 -1
- package/dist/chart_types/metric/renderer/dom/text.js +2 -3
- package/dist/chart_types/metric/renderer/dom/text.js.map +1 -1
- package/dist/chart_types/metric/renderer/dom/text_measurements.js +12 -15
- package/dist/chart_types/metric/renderer/dom/text_measurements.js.map +1 -1
- package/dist/chart_types/metric/renderer/dom/text_processing.js +2 -3
- package/dist/chart_types/metric/renderer/dom/text_processing.js.map +1 -1
- package/dist/chart_types/metric/specs/index.d.ts +6 -6
- package/dist/chart_types/metric/specs/index.d.ts.map +1 -1
- package/dist/chart_types/metric/specs/index.js +2 -2
- package/dist/chart_types/metric/state/chart_state.js +26 -29
- package/dist/chart_types/metric/state/chart_state.js.map +1 -1
- package/dist/chart_types/metric/state/selectors/can_display_chart_titles.js +1 -2
- package/dist/chart_types/metric/state/selectors/can_display_chart_titles.js.map +1 -1
- package/dist/chart_types/metric/state/selectors/data.js +2 -2
- package/dist/chart_types/metric/state/selectors/data.js.map +1 -1
- package/dist/chart_types/partition_chart/layout/config.d.ts +1 -1
- package/dist/chart_types/partition_chart/layout/config.d.ts.map +1 -1
- package/dist/chart_types/partition_chart/layout/config.js.map +1 -1
- package/dist/chart_types/partition_chart/layout/types/config_types.d.ts +2 -2
- package/dist/chart_types/partition_chart/layout/types/config_types.d.ts.map +1 -1
- package/dist/chart_types/partition_chart/layout/types/viewmodel_types.d.ts +6 -6
- package/dist/chart_types/partition_chart/layout/types/viewmodel_types.d.ts.map +1 -1
- package/dist/chart_types/partition_chart/layout/types/viewmodel_types.js +0 -1
- package/dist/chart_types/partition_chart/layout/types/viewmodel_types.js.map +1 -1
- package/dist/chart_types/partition_chart/layout/utils/circline_geometry.js +2 -3
- package/dist/chart_types/partition_chart/layout/utils/circline_geometry.js.map +1 -1
- package/dist/chart_types/partition_chart/layout/utils/group_by_rollup.d.ts +2 -2
- package/dist/chart_types/partition_chart/layout/utils/group_by_rollup.d.ts.map +1 -1
- package/dist/chart_types/partition_chart/layout/utils/group_by_rollup.js +3 -4
- package/dist/chart_types/partition_chart/layout/utils/group_by_rollup.js.map +1 -1
- package/dist/chart_types/partition_chart/layout/utils/highlighted_geoms.d.ts +1 -1
- package/dist/chart_types/partition_chart/layout/utils/highlighted_geoms.d.ts.map +1 -1
- package/dist/chart_types/partition_chart/layout/utils/highlighted_geoms.js +7 -7
- package/dist/chart_types/partition_chart/layout/utils/highlighted_geoms.js.map +1 -1
- package/dist/chart_types/partition_chart/layout/utils/legend_labels.js +5 -8
- package/dist/chart_types/partition_chart/layout/utils/legend_labels.js.map +1 -1
- package/dist/chart_types/partition_chart/layout/utils/sunburst.js.map +1 -1
- package/dist/chart_types/partition_chart/layout/utils/treemap.d.ts +1 -1
- package/dist/chart_types/partition_chart/layout/utils/treemap.d.ts.map +1 -1
- package/dist/chart_types/partition_chart/layout/utils/treemap.js +4 -6
- package/dist/chart_types/partition_chart/layout/utils/treemap.js.map +1 -1
- package/dist/chart_types/partition_chart/layout/utils/waffle.js.map +1 -1
- package/dist/chart_types/partition_chart/layout/viewmodel/fill_text_layout.js +8 -14
- package/dist/chart_types/partition_chart/layout/viewmodel/fill_text_layout.js.map +1 -1
- package/dist/chart_types/partition_chart/layout/viewmodel/hierarchy_of_arrays.js.map +1 -1
- package/dist/chart_types/partition_chart/layout/viewmodel/link_text_layout.js +1 -2
- package/dist/chart_types/partition_chart/layout/viewmodel/link_text_layout.js.map +1 -1
- package/dist/chart_types/partition_chart/layout/viewmodel/picked_shapes.js +3 -4
- package/dist/chart_types/partition_chart/layout/viewmodel/picked_shapes.js.map +1 -1
- package/dist/chart_types/partition_chart/layout/viewmodel/scenegraph.js +1 -2
- package/dist/chart_types/partition_chart/layout/viewmodel/scenegraph.js.map +1 -1
- package/dist/chart_types/partition_chart/layout/viewmodel/viewmodel.js +6 -8
- package/dist/chart_types/partition_chart/layout/viewmodel/viewmodel.js.map +1 -1
- package/dist/chart_types/partition_chart/renderer/canvas/canvas_linear_renderers.js +3 -4
- package/dist/chart_types/partition_chart/renderer/canvas/canvas_linear_renderers.js.map +1 -1
- package/dist/chart_types/partition_chart/renderer/canvas/canvas_renderers.js +3 -3
- package/dist/chart_types/partition_chart/renderer/canvas/canvas_renderers.js.map +1 -1
- package/dist/chart_types/partition_chart/renderer/canvas/partition.js +5 -3
- package/dist/chart_types/partition_chart/renderer/canvas/partition.js.map +1 -1
- package/dist/chart_types/partition_chart/renderer/dom/highlighter.js +7 -10
- package/dist/chart_types/partition_chart/renderer/dom/highlighter.js.map +1 -1
- package/dist/chart_types/partition_chart/renderer/dom/highlighter_hover.js.map +1 -1
- package/dist/chart_types/partition_chart/renderer/dom/highlighter_legend.js.map +1 -1
- package/dist/chart_types/partition_chart/renderer/dom/layered_partition_chart.js.map +1 -1
- package/dist/chart_types/partition_chart/specs/index.d.ts +13 -12
- package/dist/chart_types/partition_chart/specs/index.d.ts.map +1 -1
- package/dist/chart_types/partition_chart/specs/index.js +2 -2
- package/dist/chart_types/partition_chart/specs/index.js.map +1 -1
- package/dist/chart_types/partition_chart/state/chart_state.js +7 -4
- package/dist/chart_types/partition_chart/state/chart_state.js.map +1 -1
- package/dist/chart_types/partition_chart/state/selectors/compute_legend.js +19 -24
- package/dist/chart_types/partition_chart/state/selectors/compute_legend.js.map +1 -1
- package/dist/chart_types/partition_chart/state/selectors/geometries.js +7 -9
- package/dist/chart_types/partition_chart/state/selectors/geometries.js.map +1 -1
- package/dist/chart_types/partition_chart/state/selectors/get_chart_type_description.js +1 -2
- package/dist/chart_types/partition_chart/state/selectors/get_chart_type_description.js.map +1 -1
- package/dist/chart_types/partition_chart/state/selectors/get_partition_specs.js +3 -3
- package/dist/chart_types/partition_chart/state/selectors/get_partition_specs.js.map +1 -1
- package/dist/chart_types/partition_chart/state/selectors/get_screen_reader_data.js +5 -7
- package/dist/chart_types/partition_chart/state/selectors/get_screen_reader_data.js.map +1 -1
- package/dist/chart_types/partition_chart/state/selectors/on_element_click_caller.js.map +1 -1
- package/dist/chart_types/partition_chart/state/selectors/partition_spec.js +5 -4
- package/dist/chart_types/partition_chart/state/selectors/partition_spec.js.map +1 -1
- package/dist/chart_types/partition_chart/state/selectors/tree.js +8 -8
- package/dist/chart_types/partition_chart/state/selectors/tree.js.map +1 -1
- package/dist/chart_types/timeslip/internal_chart_state.js +27 -27
- package/dist/chart_types/timeslip/internal_chart_state.js.map +1 -1
- package/dist/chart_types/timeslip/projections/axis_model.js +1 -2
- package/dist/chart_types/timeslip/projections/axis_model.js.map +1 -1
- package/dist/chart_types/timeslip/timeslip/data.js +2 -2
- package/dist/chart_types/timeslip/timeslip/data.js.map +1 -1
- package/dist/chart_types/timeslip/timeslip/data_fetch.d.ts +1 -1
- package/dist/chart_types/timeslip/timeslip/data_fetch.d.ts.map +1 -1
- package/dist/chart_types/timeslip/timeslip/data_fetch.js +5 -8
- package/dist/chart_types/timeslip/timeslip/data_fetch.js.map +1 -1
- package/dist/chart_types/timeslip/timeslip/render/cartesian.d.ts +1 -1
- package/dist/chart_types/timeslip/timeslip/render/cartesian.d.ts.map +1 -1
- package/dist/chart_types/timeslip/timeslip/render/cartesian.js +2 -3
- package/dist/chart_types/timeslip/timeslip/render/cartesian.js.map +1 -1
- package/dist/chart_types/timeslip/timeslip/render/column.js +1 -1
- package/dist/chart_types/timeslip/timeslip/render/column.js.map +1 -1
- package/dist/chart_types/timeslip/timeslip/render/raster.js +5 -6
- package/dist/chart_types/timeslip/timeslip/render/raster.js.map +1 -1
- package/dist/chart_types/timeslip/timeslip/timeslip_render.js +2 -3
- package/dist/chart_types/timeslip/timeslip/timeslip_render.js.map +1 -1
- package/dist/chart_types/timeslip/timeslip_api.d.ts +5 -5
- package/dist/chart_types/timeslip/timeslip_api.d.ts.map +1 -1
- package/dist/chart_types/timeslip/timeslip_api.js +2 -2
- package/dist/chart_types/timeslip/timeslip_api.js.map +1 -1
- package/dist/chart_types/timeslip/timeslip_chart.js +56 -61
- package/dist/chart_types/timeslip/timeslip_chart.js.map +1 -1
- package/dist/chart_types/timeslip/utils/multitouch.js +7 -11
- package/dist/chart_types/timeslip/utils/multitouch.js.map +1 -1
- package/dist/chart_types/wordcloud/layout/types/viewmodel_types.d.ts +3 -3
- package/dist/chart_types/wordcloud/layout/types/viewmodel_types.d.ts.map +1 -1
- package/dist/chart_types/wordcloud/renderer/svg/connected_component.js +4 -5
- package/dist/chart_types/wordcloud/renderer/svg/connected_component.js.map +1 -1
- package/dist/chart_types/wordcloud/specs/index.d.ts +5 -5
- package/dist/chart_types/wordcloud/specs/index.d.ts.map +1 -1
- package/dist/chart_types/wordcloud/specs/index.js +2 -2
- package/dist/chart_types/wordcloud/specs/index.js.map +1 -1
- package/dist/chart_types/wordcloud/state/chart_state.js +7 -10
- package/dist/chart_types/wordcloud/state/chart_state.js.map +1 -1
- package/dist/chart_types/wordcloud/state/selectors/geometries.js +3 -3
- package/dist/chart_types/wordcloud/state/selectors/geometries.js.map +1 -1
- package/dist/chart_types/wordcloud/state/selectors/on_element_click_caller.js.map +1 -1
- package/dist/chart_types/wordcloud/state/selectors/wordcloud_spec.js +3 -3
- package/dist/chart_types/wordcloud/state/selectors/wordcloud_spec.js.map +1 -1
- package/dist/chart_types/xy_chart/annotations/line/dimensions.js +3 -5
- package/dist/chart_types/xy_chart/annotations/line/dimensions.js.map +1 -1
- package/dist/chart_types/xy_chart/annotations/rect/dimensions.js +5 -6
- package/dist/chart_types/xy_chart/annotations/rect/dimensions.js.map +1 -1
- package/dist/chart_types/xy_chart/annotations/tooltip.js +1 -1
- package/dist/chart_types/xy_chart/annotations/tooltip.js.map +1 -1
- package/dist/chart_types/xy_chart/annotations/types.d.ts +2 -2
- package/dist/chart_types/xy_chart/annotations/types.d.ts.map +1 -1
- package/dist/chart_types/xy_chart/annotations/utils.js +1 -1
- package/dist/chart_types/xy_chart/annotations/utils.js.map +1 -1
- package/dist/chart_types/xy_chart/axes/axes_sizes.js +2 -3
- package/dist/chart_types/xy_chart/axes/axes_sizes.js.map +1 -1
- package/dist/chart_types/xy_chart/axes/timeslip/chrono/cached_chrono.d.ts +1 -1
- package/dist/chart_types/xy_chart/axes/timeslip/chrono/cached_chrono.d.ts.map +1 -1
- package/dist/chart_types/xy_chart/axes/timeslip/chrono/cached_chrono.js.map +1 -1
- package/dist/chart_types/xy_chart/axes/timeslip/chrono/chrono.js.map +1 -1
- package/dist/chart_types/xy_chart/axes/timeslip/continuous_time_rasters.js +2 -2
- package/dist/chart_types/xy_chart/axes/timeslip/continuous_time_rasters.js.map +1 -1
- package/dist/chart_types/xy_chart/axes/timeslip/multilayer_ticks.js.map +1 -1
- package/dist/chart_types/xy_chart/axes/timeslip/numerical_rasters.js +1 -2
- package/dist/chart_types/xy_chart/axes/timeslip/numerical_rasters.js.map +1 -1
- package/dist/chart_types/xy_chart/domains/x_domain.js +6 -4
- package/dist/chart_types/xy_chart/domains/x_domain.js.map +1 -1
- package/dist/chart_types/xy_chart/domains/y_domain.js +3 -4
- package/dist/chart_types/xy_chart/domains/y_domain.js.map +1 -1
- package/dist/chart_types/xy_chart/legend/legend.js +6 -9
- package/dist/chart_types/xy_chart/legend/legend.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/animations/animation.d.ts +2 -2
- package/dist/chart_types/xy_chart/renderer/canvas/animations/animation.d.ts.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/animations/animation.js +17 -9
- package/dist/chart_types/xy_chart/renderer/canvas/animations/animation.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/animations/index.js +1 -2
- package/dist/chart_types/xy_chart/renderer/canvas/animations/index.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/annotations/index.js +1 -2
- package/dist/chart_types/xy_chart/renderer/canvas/annotations/index.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/annotations/lines.js +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/annotations/lines.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/annotations/rect.js +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/annotations/rect.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/areas.js +1 -2
- package/dist/chart_types/xy_chart/renderer/canvas/areas.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/axes/axis_props.d.ts +2 -0
- package/dist/chart_types/xy_chart/renderer/canvas/axes/axis_props.d.ts.map +1 -0
- package/dist/{state/actions/index.js → chart_types/xy_chart/renderer/canvas/axes/axis_props.js} +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/axes/axis_props.js.map +1 -0
- package/dist/chart_types/xy_chart/renderer/canvas/axes/index.js +5 -4
- package/dist/chart_types/xy_chart/renderer/canvas/axes/index.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/axes/tick.js +16 -10
- package/dist/chart_types/xy_chart/renderer/canvas/axes/tick.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/axes/tick_label.js +3 -4
- package/dist/chart_types/xy_chart/renderer/canvas/axes/tick_label.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/bars.js +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/bars.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/bubbles.js +1 -2
- package/dist/chart_types/xy_chart/renderer/canvas/bubbles.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/grids.js +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/grids.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/lines.js +1 -2
- package/dist/chart_types/xy_chart/renderer/canvas/lines.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/panels/panels.js +3 -4
- package/dist/chart_types/xy_chart/renderer/canvas/panels/panels.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/panels/title.js +3 -3
- package/dist/chart_types/xy_chart/renderer/canvas/panels/title.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/points.js +1 -2
- package/dist/chart_types/xy_chart/renderer/canvas/points.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/primitives/path.js +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/primitives/path.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/primitives/shapes.js +2 -2
- package/dist/chart_types/xy_chart/renderer/canvas/primitives/shapes.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/renderers.js +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/renderers.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/styles/area.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/styles/bar.js +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/styles/bar.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/utils/panel_transform.js +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/utils/panel_transform.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/values/bar.js +6 -7
- package/dist/chart_types/xy_chart/renderer/canvas/values/bar.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/canvas/xy_chart.js +4 -1
- package/dist/chart_types/xy_chart/renderer/canvas/xy_chart.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/common/utils.js +1 -1
- package/dist/chart_types/xy_chart/renderer/common/utils.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/dom/annotations/annotation_tooltip.js +7 -9
- package/dist/chart_types/xy_chart/renderer/dom/annotations/annotation_tooltip.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/dom/annotations/annotations.js +1 -1
- package/dist/chart_types/xy_chart/renderer/dom/annotations/annotations.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/dom/annotations/line_marker.js +5 -7
- package/dist/chart_types/xy_chart/renderer/dom/annotations/line_marker.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/dom/annotations/tooltip_content.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/dom/cursor_band.js +7 -9
- package/dist/chart_types/xy_chart/renderer/dom/cursor_band.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/dom/cursor_crossline.js +3 -3
- package/dist/chart_types/xy_chart/renderer/dom/cursor_crossline.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/dom/cursor_line.js +8 -9
- package/dist/chart_types/xy_chart/renderer/dom/cursor_line.js.map +1 -1
- package/dist/chart_types/xy_chart/renderer/dom/highlighter.js +1 -1
- package/dist/chart_types/xy_chart/renderer/dom/highlighter.js.map +1 -1
- package/dist/chart_types/xy_chart/rendering/area.js.map +1 -1
- package/dist/chart_types/xy_chart/rendering/bars.js +10 -11
- package/dist/chart_types/xy_chart/rendering/bars.js.map +1 -1
- package/dist/chart_types/xy_chart/rendering/bubble.js.map +1 -1
- package/dist/chart_types/xy_chart/rendering/line.js.map +1 -1
- package/dist/chart_types/xy_chart/rendering/line_area_style.js +2 -4
- package/dist/chart_types/xy_chart/rendering/line_area_style.js.map +1 -1
- package/dist/chart_types/xy_chart/rendering/point_style.js +1 -2
- package/dist/chart_types/xy_chart/rendering/point_style.js.map +1 -1
- package/dist/chart_types/xy_chart/rendering/points.js +4 -6
- package/dist/chart_types/xy_chart/rendering/points.js.map +1 -1
- package/dist/chart_types/xy_chart/rendering/utils.js +3 -5
- package/dist/chart_types/xy_chart/rendering/utils.js.map +1 -1
- package/dist/chart_types/xy_chart/scales/get_api_scales.js +4 -4
- package/dist/chart_types/xy_chart/scales/get_api_scales.js.map +1 -1
- package/dist/chart_types/xy_chart/specs/area_series.d.ts +4 -4
- package/dist/chart_types/xy_chart/specs/area_series.d.ts.map +1 -1
- package/dist/chart_types/xy_chart/specs/area_series.js +2 -2
- package/dist/chart_types/xy_chart/specs/area_series.js.map +1 -1
- package/dist/chart_types/xy_chart/specs/axis.d.ts +3 -3
- package/dist/chart_types/xy_chart/specs/axis.d.ts.map +1 -1
- package/dist/chart_types/xy_chart/specs/axis.js +2 -2
- package/dist/chart_types/xy_chart/specs/axis.js.map +1 -1
- package/dist/chart_types/xy_chart/specs/bar_series.d.ts +4 -4
- package/dist/chart_types/xy_chart/specs/bar_series.d.ts.map +1 -1
- package/dist/chart_types/xy_chart/specs/bar_series.js +2 -2
- package/dist/chart_types/xy_chart/specs/bar_series.js.map +1 -1
- package/dist/chart_types/xy_chart/specs/bubble_series.d.ts +4 -4
- package/dist/chart_types/xy_chart/specs/bubble_series.d.ts.map +1 -1
- package/dist/chart_types/xy_chart/specs/bubble_series.js +2 -2
- package/dist/chart_types/xy_chart/specs/bubble_series.js.map +1 -1
- package/dist/chart_types/xy_chart/specs/histogram_bar_series.d.ts +4 -4
- package/dist/chart_types/xy_chart/specs/histogram_bar_series.d.ts.map +1 -1
- package/dist/chart_types/xy_chart/specs/histogram_bar_series.js +2 -2
- package/dist/chart_types/xy_chart/specs/histogram_bar_series.js.map +1 -1
- package/dist/chart_types/xy_chart/specs/line_annotation.d.ts +4 -4
- package/dist/chart_types/xy_chart/specs/line_annotation.d.ts.map +1 -1
- package/dist/chart_types/xy_chart/specs/line_annotation.js +2 -2
- package/dist/chart_types/xy_chart/specs/line_annotation.js.map +1 -1
- package/dist/chart_types/xy_chart/specs/line_series.d.ts +4 -4
- package/dist/chart_types/xy_chart/specs/line_series.d.ts.map +1 -1
- package/dist/chart_types/xy_chart/specs/line_series.js +2 -2
- package/dist/chart_types/xy_chart/specs/line_series.js.map +1 -1
- package/dist/chart_types/xy_chart/specs/rect_annotation.d.ts +3 -3
- package/dist/chart_types/xy_chart/specs/rect_annotation.d.ts.map +1 -1
- package/dist/chart_types/xy_chart/specs/rect_annotation.js +2 -2
- package/dist/chart_types/xy_chart/specs/rect_annotation.js.map +1 -1
- package/dist/chart_types/xy_chart/state/chart_state.js +12 -4
- package/dist/chart_types/xy_chart/state/chart_state.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/axis_tick_formatter.js +4 -5
- package/dist/chart_types/xy_chart/state/selectors/axis_tick_formatter.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/compute_annotations.js +1 -1
- package/dist/chart_types/xy_chart/state/selectors/compute_annotations.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/compute_axis_ticks_dimensions.js +4 -6
- package/dist/chart_types/xy_chart/state/selectors/compute_axis_ticks_dimensions.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/compute_per_panel_axes_geoms.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/count_bars_in_cluster.js +1 -2
- package/dist/chart_types/xy_chart/state/selectors/count_bars_in_cluster.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/get_annotation_tooltip_state.js +3 -4
- package/dist/chart_types/xy_chart/state/selectors/get_annotation_tooltip_state.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/get_api_scale_configs.js +2 -4
- package/dist/chart_types/xy_chart/state/selectors/get_api_scale_configs.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/get_brush_area.js +5 -5
- package/dist/chart_types/xy_chart/state/selectors/get_brush_area.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/get_cursor_band.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/get_debug_state.js +8 -11
- package/dist/chart_types/xy_chart/state/selectors/get_debug_state.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/get_elements_at_cursor_pos.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/get_highlighted_annotation_ids_selector.js +2 -2
- package/dist/chart_types/xy_chart/state/selectors/get_highlighted_annotation_ids_selector.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/get_legend_item_extra_values.js +2 -2
- package/dist/chart_types/xy_chart/state/selectors/get_legend_item_extra_values.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/get_multiple_rectangle_annotations.js +1 -1
- package/dist/chart_types/xy_chart/state/selectors/get_multiple_rectangle_annotations.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/get_oriented_projected_pointer_position.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/get_projected_pointer_position.js +2 -3
- package/dist/chart_types/xy_chart/state/selectors/get_projected_pointer_position.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/get_si_dataseries_map.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/get_specs.js +5 -5
- package/dist/chart_types/xy_chart/state/selectors/get_specs.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/get_tooltip_values_highlighted_geoms.js +3 -3
- package/dist/chart_types/xy_chart/state/selectors/get_tooltip_values_highlighted_geoms.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/is_tooltip_visible.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/on_brush_end_caller.js +3 -3
- package/dist/chart_types/xy_chart/state/selectors/on_brush_end_caller.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/on_click_caller.js +2 -2
- package/dist/chart_types/xy_chart/state/selectors/on_click_caller.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/on_element_out_caller.js +4 -7
- package/dist/chart_types/xy_chart/state/selectors/on_element_out_caller.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/on_element_over_caller.js +2 -4
- package/dist/chart_types/xy_chart/state/selectors/on_element_over_caller.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/on_pointer_move_caller.js +12 -12
- package/dist/chart_types/xy_chart/state/selectors/on_pointer_move_caller.js.map +1 -1
- package/dist/chart_types/xy_chart/state/selectors/visible_ticks.js +7 -8
- package/dist/chart_types/xy_chart/state/selectors/visible_ticks.js.map +1 -1
- package/dist/chart_types/xy_chart/state/utils/common.js.map +1 -1
- package/dist/chart_types/xy_chart/state/utils/get_legend_values.js +7 -2
- package/dist/chart_types/xy_chart/state/utils/get_legend_values.js.map +1 -1
- package/dist/chart_types/xy_chart/state/utils/spec.js.map +1 -1
- package/dist/chart_types/xy_chart/state/utils/utils.js +13 -16
- package/dist/chart_types/xy_chart/state/utils/utils.js.map +1 -1
- package/dist/chart_types/xy_chart/tooltip/tooltip.js +3 -6
- package/dist/chart_types/xy_chart/tooltip/tooltip.js.map +1 -1
- package/dist/chart_types/xy_chart/utils/axis_utils.js +3 -5
- package/dist/chart_types/xy_chart/utils/axis_utils.js.map +1 -1
- package/dist/chart_types/xy_chart/utils/dimensions.js.map +1 -1
- package/dist/chart_types/xy_chart/utils/diverging_offsets.js +10 -14
- package/dist/chart_types/xy_chart/utils/diverging_offsets.js.map +1 -1
- package/dist/chart_types/xy_chart/utils/fill_series.js.map +1 -1
- package/dist/chart_types/xy_chart/utils/fit_function.js.map +1 -1
- package/dist/chart_types/xy_chart/utils/fit_function_utils.js.map +1 -1
- package/dist/chart_types/xy_chart/utils/grid_lines.js +10 -14
- package/dist/chart_types/xy_chart/utils/grid_lines.js.map +1 -1
- package/dist/chart_types/xy_chart/utils/indexed_geometry_linear_map.js +2 -5
- package/dist/chart_types/xy_chart/utils/indexed_geometry_linear_map.js.map +1 -1
- package/dist/chart_types/xy_chart/utils/indexed_geometry_map.js +2 -4
- package/dist/chart_types/xy_chart/utils/indexed_geometry_map.js.map +1 -1
- package/dist/chart_types/xy_chart/utils/indexed_geometry_spatial_map.js +6 -7
- package/dist/chart_types/xy_chart/utils/indexed_geometry_spatial_map.js.map +1 -1
- package/dist/chart_types/xy_chart/utils/series.d.ts +5 -5
- package/dist/chart_types/xy_chart/utils/series.d.ts.map +1 -1
- package/dist/chart_types/xy_chart/utils/series.js +22 -31
- package/dist/chart_types/xy_chart/utils/series.js.map +1 -1
- package/dist/chart_types/xy_chart/utils/specs.d.ts +18 -19
- package/dist/chart_types/xy_chart/utils/specs.d.ts.map +1 -1
- package/dist/chart_types/xy_chart/utils/specs.js.map +1 -1
- package/dist/chart_types/xy_chart/utils/stacked_series_utils.js +2 -4
- package/dist/chart_types/xy_chart/utils/stacked_series_utils.js.map +1 -1
- package/dist/chart_types/xy_chart/utils/texture.js +11 -15
- package/dist/chart_types/xy_chart/utils/texture.js.map +1 -1
- package/dist/common/aggregations.js +2 -3
- package/dist/common/aggregations.js.map +1 -1
- package/dist/common/animation.d.ts +1 -1
- package/dist/common/animation.d.ts.map +1 -1
- package/dist/common/color_calcs.js +1 -1
- package/dist/common/color_calcs.js.map +1 -1
- package/dist/common/color_library_wrappers.d.ts.map +1 -1
- package/dist/common/color_library_wrappers.js +1 -2
- package/dist/common/color_library_wrappers.js.map +1 -1
- package/dist/common/colors.js +20 -0
- package/dist/common/colors.js.map +1 -1
- package/dist/common/config_objects.js +6 -1
- package/dist/common/config_objects.js.map +1 -1
- package/dist/common/data_structures.js +2 -0
- package/dist/common/data_structures.js.map +1 -1
- package/dist/common/event_handler_selectors.js +2 -2
- package/dist/common/event_handler_selectors.js.map +1 -1
- package/dist/common/fill_text_color.js.map +1 -1
- package/dist/common/geometry.js +3 -5
- package/dist/common/geometry.js.map +1 -1
- package/dist/common/kingly.js +6 -9
- package/dist/common/kingly.js.map +1 -1
- package/dist/common/legend.d.ts +2 -2
- package/dist/common/legend.d.ts.map +1 -1
- package/dist/common/legend.js +3 -1
- package/dist/common/legend.js.map +1 -1
- package/dist/common/math.js +1 -2
- package/dist/common/math.js.map +1 -1
- package/dist/common/panel_utils.d.ts +1 -1
- package/dist/common/panel_utils.d.ts.map +1 -1
- package/dist/common/panel_utils.js +2 -3
- package/dist/common/panel_utils.js.map +1 -1
- package/dist/common/predicate.d.ts +1 -1
- package/dist/common/predicate.d.ts.map +1 -1
- package/dist/common/series_id.d.ts +2 -2
- package/dist/common/series_id.d.ts.map +1 -1
- package/dist/common/text_utils.d.ts +1 -1
- package/dist/common/text_utils.d.ts.map +1 -1
- package/dist/components/accessibility/goal_semantic_description.js +1 -2
- package/dist/components/accessibility/goal_semantic_description.js.map +1 -1
- package/dist/components/accessibility/label.js +7 -7
- package/dist/components/accessibility/label.js.map +1 -1
- package/dist/components/accessibility/partitions_data_table.js.map +1 -1
- package/dist/components/accessibility/screen_reader_summary.js.map +1 -1
- package/dist/components/brush/brush.js +26 -23
- package/dist/components/brush/brush.js.map +1 -1
- package/dist/components/chart.d.ts +5 -4
- package/dist/components/chart.d.ts.map +1 -1
- package/dist/components/chart.js +11 -10
- package/dist/components/chart.js.map +1 -1
- package/dist/components/chart_background.js +1 -1
- package/dist/components/chart_background.js.map +1 -1
- package/dist/components/chart_container.js +88 -82
- package/dist/components/chart_container.js.map +1 -1
- package/dist/components/chart_resizer.js +13 -12
- package/dist/components/chart_resizer.js.map +1 -1
- package/dist/components/chart_status.js +9 -12
- package/dist/components/chart_status.js.map +1 -1
- package/dist/components/grid/aligned_grid.js.map +1 -1
- package/dist/components/icons/icon.js.map +1 -1
- package/dist/components/legend/color.js.map +1 -1
- package/dist/components/legend/custom_legend.js.map +1 -1
- package/dist/components/legend/label.js +2 -2
- package/dist/components/legend/label.js.map +1 -1
- package/dist/components/legend/legend.js +10 -14
- package/dist/components/legend/legend.js.map +1 -1
- package/dist/components/legend/legend_color_picker.js +3 -3
- package/dist/components/legend/legend_color_picker.js.map +1 -1
- package/dist/components/legend/legend_icon.js +2 -2
- package/dist/components/legend/legend_icon.js.map +1 -1
- package/dist/components/legend/legend_item.js +4 -4
- package/dist/components/legend/legend_item.js.map +1 -1
- package/dist/components/legend/legend_table/legend_table.js +1 -2
- package/dist/components/legend/legend_table/legend_table.js.map +1 -1
- package/dist/components/legend/legend_table/legend_table_cell.d.ts +2 -1
- package/dist/components/legend/legend_table/legend_table_cell.d.ts.map +1 -1
- package/dist/components/legend/legend_table/legend_table_cell.js.map +1 -1
- package/dist/components/legend/legend_table/legend_table_header.js.map +1 -1
- package/dist/components/legend/legend_table/legend_table_item.js +4 -4
- package/dist/components/legend/legend_table/legend_table_item.js.map +1 -1
- package/dist/components/legend/style_utils.js +1 -1
- package/dist/components/legend/style_utils.js.map +1 -1
- package/dist/components/legend/utils.js +1 -1
- package/dist/components/legend/utils.js.map +1 -1
- package/dist/components/no_results.js +1 -1
- package/dist/components/no_results.js.map +1 -1
- package/dist/components/portal/tooltip_portal.js +5 -6
- package/dist/components/portal/tooltip_portal.js.map +1 -1
- package/dist/components/portal/types.d.ts +2 -2
- package/dist/components/portal/types.d.ts.map +1 -1
- package/dist/components/portal/utils.js +1 -1
- package/dist/components/portal/utils.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_actions.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_container.d.ts +4 -3
- package/dist/components/tooltip/components/tooltip_container.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_container.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_divider.d.ts +2 -1
- package/dist/components/tooltip/components/tooltip_divider.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_divider.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_footer.d.ts +2 -1
- package/dist/components/tooltip/components/tooltip_footer.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_footer.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_header.d.ts +4 -4
- package/dist/components/tooltip/components/tooltip_header.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_header.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_metric_row.d.ts +2 -1
- package/dist/components/tooltip/components/tooltip_metric_row.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_metric_row.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_prompt.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_provider.d.ts +5 -5
- package/dist/components/tooltip/components/tooltip_provider.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_provider.js +1 -1
- package/dist/components/tooltip/components/tooltip_provider.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_table.d.ts +7 -6
- package/dist/components/tooltip/components/tooltip_table.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_table.js +3 -5
- package/dist/components/tooltip/components/tooltip_table.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_body.d.ts +5 -5
- package/dist/components/tooltip/components/tooltip_table_body.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_body.js +6 -3
- package/dist/components/tooltip/components/tooltip_table_body.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_cell.d.ts +3 -2
- package/dist/components/tooltip/components/tooltip_table_cell.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_cell.js +1 -1
- package/dist/components/tooltip/components/tooltip_table_cell.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_color_cell.d.ts +1 -1
- package/dist/components/tooltip/components/tooltip_table_color_cell.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_color_cell.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_footer.d.ts +5 -5
- package/dist/components/tooltip/components/tooltip_table_footer.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_footer.js +2 -2
- package/dist/components/tooltip/components/tooltip_table_footer.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_header.d.ts +5 -5
- package/dist/components/tooltip/components/tooltip_table_header.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_header.js +1 -1
- package/dist/components/tooltip/components/tooltip_table_header.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_row.d.ts +2 -1
- package/dist/components/tooltip/components/tooltip_table_row.d.ts.map +1 -1
- package/dist/components/tooltip/components/tooltip_table_row.js.map +1 -1
- package/dist/components/tooltip/components/tooltip_wrapper.js.map +1 -1
- package/dist/components/tooltip/components/types.d.ts +5 -5
- package/dist/components/tooltip/components/types.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.js +14 -15
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/components/tooltip/types.d.ts +5 -5
- package/dist/components/tooltip/types.d.ts.map +1 -1
- package/dist/geoms/path.js +4 -4
- package/dist/geoms/path.js.map +1 -1
- package/dist/geoms/types.d.ts +2 -2
- package/dist/geoms/types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/renderers/canvas/index.js +3 -5
- package/dist/renderers/canvas/index.js.map +1 -1
- package/dist/renderers/canvas/primitives/line.d.ts.map +1 -0
- package/dist/{chart_types/xy_chart/renderer → renderers}/canvas/primitives/line.js +3 -3
- package/dist/renderers/canvas/primitives/line.js.map +1 -0
- package/dist/renderers/canvas/primitives/rect.d.ts.map +1 -0
- package/dist/{chart_types/xy_chart/renderer → renderers}/canvas/primitives/rect.js +3 -4
- package/dist/renderers/canvas/primitives/rect.js.map +1 -0
- package/dist/renderers/canvas/primitives/text.d.ts.map +1 -0
- package/dist/{chart_types/xy_chart/renderer → renderers}/canvas/primitives/text.js +6 -7
- package/dist/renderers/canvas/primitives/text.js.map +1 -0
- package/dist/renderers/canvas/utils/debug.d.ts +2 -0
- package/dist/renderers/canvas/utils/debug.d.ts.map +1 -0
- package/dist/{chart_types/xy_chart/renderer → renderers}/canvas/utils/debug.js +15 -13
- package/dist/renderers/canvas/utils/debug.js.map +1 -0
- package/dist/scales/constants.d.ts +1 -1
- package/dist/scales/constants.d.ts.map +1 -1
- package/dist/scales/index.d.ts +1 -1
- package/dist/scales/index.d.ts.map +1 -1
- package/dist/scales/scale_band.js +15 -1
- package/dist/scales/scale_band.js.map +1 -1
- package/dist/scales/scale_continuous.js +21 -5
- package/dist/scales/scale_continuous.js.map +1 -1
- package/dist/scales/utils.js +1 -2
- package/dist/scales/utils.js.map +1 -1
- package/dist/solvers/screenspace_marker_scale_compressor.js +3 -4
- package/dist/solvers/screenspace_marker_scale_compressor.js.map +1 -1
- package/dist/specs/brush_axis.d.ts +10 -0
- package/dist/specs/brush_axis.d.ts.map +1 -0
- package/dist/specs/brush_axis.js +9 -0
- package/dist/specs/brush_axis.js.map +1 -0
- package/dist/specs/constants.d.ts +1 -44
- package/dist/specs/constants.d.ts.map +1 -1
- package/dist/specs/constants.js +1 -66
- package/dist/specs/constants.js.map +1 -1
- package/dist/specs/default_legend_config.d.ts +2 -0
- package/dist/specs/default_legend_config.d.ts.map +1 -0
- package/dist/specs/default_legend_config.js +13 -0
- package/dist/specs/default_legend_config.js.map +1 -0
- package/dist/specs/default_settings_spec.d.ts +6 -0
- package/dist/specs/default_settings_spec.d.ts.map +1 -0
- package/dist/specs/default_settings_spec.js +41 -0
- package/dist/specs/default_settings_spec.js.map +1 -0
- package/dist/specs/group_by.d.ts +6 -5
- package/dist/specs/group_by.d.ts.map +1 -1
- package/dist/specs/group_by.js +2 -2
- package/dist/specs/group_by.js.map +1 -1
- package/dist/specs/index.d.ts +5 -10
- package/dist/specs/index.d.ts.map +1 -1
- package/dist/specs/index.js +5 -0
- package/dist/specs/index.js.map +1 -1
- package/dist/specs/pointer_update_trigger.d.ts +13 -0
- package/dist/specs/pointer_update_trigger.d.ts.map +1 -0
- package/dist/specs/pointer_update_trigger.js +9 -0
- package/dist/specs/pointer_update_trigger.js.map +1 -0
- package/dist/specs/settings.d.ts +29 -79
- package/dist/specs/settings.d.ts.map +1 -1
- package/dist/specs/settings.js +5 -4
- package/dist/specs/settings.js.map +1 -1
- package/dist/specs/settings_types.d.ts +65 -0
- package/dist/specs/settings_types.d.ts.map +1 -0
- package/dist/specs/settings_types.js +8 -0
- package/dist/specs/settings_types.js.map +1 -0
- package/dist/specs/small_multiples.d.ts +3 -3
- package/dist/specs/small_multiples.d.ts.map +1 -1
- package/dist/specs/small_multiples.js +2 -2
- package/dist/specs/spec_type.d.ts +24 -0
- package/dist/specs/spec_type.d.ts.map +1 -0
- package/dist/specs/spec_type.js +13 -0
- package/dist/specs/spec_type.js.map +1 -0
- package/dist/specs/specs_parser.js.map +1 -1
- package/dist/specs/tooltip.d.ts +14 -13
- package/dist/specs/tooltip.d.ts.map +1 -1
- package/dist/specs/tooltip.js +2 -1
- package/dist/specs/tooltip.js.map +1 -1
- package/dist/state/actions/chart.js +3 -6
- package/dist/state/actions/chart.js.map +1 -1
- package/dist/state/actions/chart_settings.js +4 -11
- package/dist/state/actions/chart_settings.js.map +1 -1
- package/dist/state/actions/colors.js +5 -16
- package/dist/state/actions/colors.js.map +1 -1
- package/dist/state/actions/dom_element.js +5 -16
- package/dist/state/actions/dom_element.js.map +1 -1
- package/dist/state/actions/events.js +3 -6
- package/dist/state/actions/events.js.map +1 -1
- package/dist/state/actions/key.js +3 -6
- package/dist/state/actions/key.js.map +1 -1
- package/dist/state/actions/legend.d.ts +1 -1
- package/dist/state/actions/legend.d.ts.map +1 -1
- package/dist/state/actions/legend.js +10 -16
- package/dist/state/actions/legend.js.map +1 -1
- package/dist/state/actions/mouse.js +6 -21
- package/dist/state/actions/mouse.js.map +1 -1
- package/dist/state/actions/specs.js +6 -21
- package/dist/state/actions/specs.js.map +1 -1
- package/dist/state/actions/tooltip.js +10 -16
- package/dist/state/actions/tooltip.js.map +1 -1
- package/dist/state/actions/z_index.js +3 -6
- package/dist/state/actions/z_index.js.map +1 -1
- package/dist/state/chart_slice_state.d.ts +2 -0
- package/dist/state/chart_slice_state.d.ts.map +1 -0
- package/dist/state/chart_slice_state.js +3 -0
- package/dist/state/chart_slice_state.js.map +1 -0
- package/dist/state/chart_state.d.ts +2 -1
- package/dist/state/chart_state.d.ts.map +1 -1
- package/dist/state/chart_state.js +135 -221
- package/dist/state/chart_state.js.map +1 -1
- package/dist/state/chart_type_from_specs.d.ts +2 -0
- package/dist/state/chart_type_from_specs.d.ts.map +1 -0
- package/dist/state/chart_type_from_specs.js +18 -0
- package/dist/state/chart_type_from_specs.js.map +1 -0
- package/dist/state/color_overrides.d.ts +2 -0
- package/dist/state/color_overrides.d.ts.map +1 -0
- package/dist/state/color_overrides.js +3 -0
- package/dist/state/color_overrides.js.map +1 -0
- package/dist/state/create_selector.js +12 -9
- package/dist/state/create_selector.js.map +1 -1
- package/dist/state/get_initial_state.d.ts +2 -0
- package/dist/state/get_initial_state.d.ts.map +1 -0
- package/dist/state/get_initial_state.js +45 -0
- package/dist/state/get_initial_state.js.map +1 -0
- package/dist/state/interactions_state.d.ts +2 -0
- package/dist/state/interactions_state.d.ts.map +1 -0
- package/dist/state/interactions_state.js +3 -0
- package/dist/state/interactions_state.js.map +1 -0
- package/dist/state/internal_chart_state.d.ts +2 -0
- package/dist/state/internal_chart_state.d.ts.map +1 -0
- package/dist/state/internal_chart_state.js +3 -0
- package/dist/state/internal_chart_state.js.map +1 -0
- package/dist/state/new_internal_state.d.ts +2 -0
- package/dist/state/new_internal_state.d.ts.map +1 -0
- package/dist/state/new_internal_state.js +29 -0
- package/dist/state/new_internal_state.js.map +1 -0
- package/dist/state/pointer_states.d.ts +2 -0
- package/dist/state/pointer_states.d.ts.map +1 -0
- package/dist/state/pointer_states.js +3 -0
- package/dist/state/pointer_states.js.map +1 -0
- package/dist/state/reducers/interactions.js +173 -180
- package/dist/state/reducers/interactions.js.map +1 -1
- package/dist/state/selectors/compute_panels.js.map +1 -1
- package/dist/state/selectors/compute_small_multiple_scales.js +2 -3
- package/dist/state/selectors/compute_small_multiple_scales.js.map +1 -1
- package/dist/state/selectors/get_accessibility_config.js +4 -4
- package/dist/state/selectors/get_accessibility_config.js.map +1 -1
- package/dist/state/selectors/get_active_pointer_position.js +1 -2
- package/dist/state/selectors/get_active_pointer_position.js.map +1 -1
- package/dist/state/selectors/get_chart_theme.js +11 -9
- package/dist/state/selectors/get_chart_theme.js.map +1 -1
- package/dist/state/selectors/get_internal_can_display_chart_titles.js +1 -1
- package/dist/state/selectors/get_internal_can_display_chart_titles.js.map +1 -1
- package/dist/state/selectors/get_internal_cursor_pointer.js +1 -2
- package/dist/state/selectors/get_internal_cursor_pointer.js.map +1 -1
- package/dist/state/selectors/get_legend_items.js +2 -2
- package/dist/state/selectors/get_legend_items.js.map +1 -1
- package/dist/state/selectors/get_legend_items_labels.js +3 -2
- package/dist/state/selectors/get_legend_items_labels.js.map +1 -1
- package/dist/state/selectors/get_legend_size.js +1 -2
- package/dist/state/selectors/get_legend_size.js.map +1 -1
- package/dist/state/selectors/get_legend_table_size.js.map +1 -1
- package/dist/state/selectors/get_pointer_value.js +1 -2
- package/dist/state/selectors/get_pointer_value.js.map +1 -1
- package/dist/state/selectors/get_resolved_background_color.js.map +1 -1
- package/dist/state/selectors/get_settings_spec.js +16 -14
- package/dist/state/selectors/get_settings_spec.js.map +1 -1
- package/dist/state/selectors/get_small_multiples_index_order.js +6 -6
- package/dist/state/selectors/get_small_multiples_index_order.js.map +1 -1
- package/dist/state/selectors/get_small_multiples_spec.js +5 -4
- package/dist/state/selectors/get_small_multiples_spec.js.map +1 -1
- package/dist/state/selectors/get_specs.js.map +1 -1
- package/dist/state/selectors/get_specs_by_type.js +2 -2
- package/dist/state/selectors/get_specs_by_type.js.map +1 -1
- package/dist/state/selectors/get_tooltip_spec.js +5 -5
- package/dist/state/selectors/get_tooltip_spec.js.map +1 -1
- package/dist/state/selectors/is_external_tooltip_visible.js +2 -3
- package/dist/state/selectors/is_external_tooltip_visible.js.map +1 -1
- package/dist/state/spec_factory.d.ts +2 -2
- package/dist/state/spec_factory.d.ts.map +1 -1
- package/dist/state/spec_factory.js +3 -8
- package/dist/state/spec_factory.js.map +1 -1
- package/dist/state/types.d.ts +6 -5
- package/dist/state/types.d.ts.map +1 -1
- package/dist/state/utils/get_initial_pointer_state.d.ts +2 -0
- package/dist/state/utils/get_initial_pointer_state.d.ts.map +1 -0
- package/dist/state/utils/get_initial_pointer_state.js +14 -0
- package/dist/state/utils/get_initial_pointer_state.js.map +1 -0
- package/dist/state/utils/get_initial_tooltip_state.d.ts +2 -0
- package/dist/state/utils/get_initial_tooltip_state.d.ts.map +1 -0
- package/dist/state/utils/get_initial_tooltip_state.js +9 -0
- package/dist/state/utils/get_initial_tooltip_state.js.map +1 -0
- package/dist/state/utils/get_spec_from_store.d.ts +2 -0
- package/dist/state/utils/get_spec_from_store.d.ts.map +1 -0
- package/dist/state/utils/get_spec_from_store.js +10 -0
- package/dist/state/utils/get_spec_from_store.js.map +1 -0
- package/dist/state/utils/get_specs_from_store.d.ts +2 -0
- package/dist/state/utils/get_specs_from_store.d.ts.map +1 -0
- package/dist/state/utils/get_specs_from_store.js +7 -0
- package/dist/state/utils/get_specs_from_store.js.map +1 -0
- package/dist/state/utils/is_clicking.d.ts +2 -0
- package/dist/state/utils/is_clicking.d.ts.map +1 -0
- package/dist/state/utils/is_clicking.js +7 -0
- package/dist/state/utils/is_clicking.js.map +1 -0
- package/dist/utils/accessor.d.ts +1 -1
- package/dist/utils/accessor.d.ts.map +1 -1
- package/dist/utils/bbox/canvas_text_bbox_calculator.js.map +1 -1
- package/dist/utils/chrono/elasticsearch.d.ts +1 -1
- package/dist/utils/chrono/elasticsearch.d.ts.map +1 -1
- package/dist/utils/chrono/types.d.ts +1 -1
- package/dist/utils/chrono/types.d.ts.map +1 -1
- package/dist/utils/common.d.ts +5 -5
- package/dist/utils/common.d.ts.map +1 -1
- package/dist/utils/common.js +8 -13
- package/dist/utils/common.js.map +1 -1
- package/dist/utils/curves.d.ts +1 -1
- package/dist/utils/curves.d.ts.map +1 -1
- package/dist/utils/d3-delaunay/index.js +13 -0
- package/dist/utils/d3-delaunay/index.js.map +1 -1
- package/dist/utils/data/data_processing.d.ts +1 -1
- package/dist/utils/data/data_processing.d.ts.map +1 -1
- package/dist/utils/data/data_processing.js.map +1 -1
- package/dist/utils/data/formatters.d.ts +1 -1
- package/dist/utils/data/formatters.d.ts.map +1 -1
- package/dist/utils/data_generators/data_generator.js +3 -0
- package/dist/utils/data_generators/data_generator.js.map +1 -1
- package/dist/utils/data_generators/simple_noise.js +6 -2
- package/dist/utils/data_generators/simple_noise.js.map +1 -1
- package/dist/utils/debounce.js.map +1 -1
- package/dist/utils/dimensions.d.ts +1 -1
- package/dist/utils/dimensions.d.ts.map +1 -1
- package/dist/utils/dimensions.js +2 -2
- package/dist/utils/dimensions.js.map +1 -1
- package/dist/utils/domain.d.ts.map +1 -1
- package/dist/utils/domain.js +2 -3
- package/dist/utils/domain.js.map +1 -1
- package/dist/utils/events.js.map +1 -1
- package/dist/utils/fast_deep_equal.js +1 -2
- package/dist/utils/fast_deep_equal.js.map +1 -1
- package/dist/utils/geometry.d.ts +1 -1
- package/dist/utils/geometry.d.ts.map +1 -1
- package/dist/utils/logger.js +1 -1
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/series_sort.d.ts +1 -1
- package/dist/utils/series_sort.d.ts.map +1 -1
- package/dist/utils/text/wrap.js +4 -6
- package/dist/utils/text/wrap.js.map +1 -1
- package/dist/utils/themes/amsterdam_dark_theme.d.ts +1 -1
- package/dist/utils/themes/amsterdam_dark_theme.d.ts.map +1 -1
- package/dist/utils/themes/amsterdam_dark_theme.js +0 -1
- package/dist/utils/themes/amsterdam_dark_theme.js.map +1 -1
- package/dist/utils/themes/amsterdam_light_theme.d.ts +1 -1
- package/dist/utils/themes/amsterdam_light_theme.d.ts.map +1 -1
- package/dist/utils/themes/amsterdam_light_theme.js +0 -1
- package/dist/utils/themes/amsterdam_light_theme.js.map +1 -1
- package/dist/utils/themes/dark_theme.d.ts +1 -1
- package/dist/utils/themes/dark_theme.d.ts.map +1 -1
- package/dist/utils/themes/dark_theme.js +0 -1
- package/dist/utils/themes/dark_theme.js.map +1 -1
- package/dist/utils/themes/get_charts_theme.d.ts +1 -1
- package/dist/utils/themes/get_charts_theme.d.ts.map +1 -1
- package/dist/utils/themes/legacy_dark_theme.d.ts +1 -1
- package/dist/utils/themes/legacy_dark_theme.d.ts.map +1 -1
- package/dist/utils/themes/legacy_dark_theme.js +0 -1
- package/dist/utils/themes/legacy_dark_theme.js.map +1 -1
- package/dist/utils/themes/legacy_light_theme.d.ts +1 -1
- package/dist/utils/themes/legacy_light_theme.d.ts.map +1 -1
- package/dist/utils/themes/legacy_light_theme.js +0 -1
- package/dist/utils/themes/legacy_light_theme.js.map +1 -1
- package/dist/utils/themes/light_theme.d.ts +1 -1
- package/dist/utils/themes/light_theme.d.ts.map +1 -1
- package/dist/utils/themes/light_theme.js +0 -1
- package/dist/utils/themes/light_theme.js.map +1 -1
- package/dist/utils/themes/merge_utils.d.ts +2 -2
- package/dist/utils/themes/merge_utils.d.ts.map +1 -1
- package/dist/utils/themes/merge_utils.js.map +1 -1
- package/dist/utils/themes/partition.d.ts +5 -5
- package/dist/utils/themes/partition.d.ts.map +1 -1
- package/dist/utils/themes/theme.d.ts +10 -11
- package/dist/utils/themes/theme.d.ts.map +1 -1
- package/dist/utils/themes/theme.js.map +1 -1
- package/dist/utils/time_functions.d.ts +1 -1
- package/dist/utils/time_functions.d.ts.map +1 -1
- package/dist/utils/time_zone.js +1 -1
- package/dist/utils/time_zone.js.map +1 -1
- package/dist/utils/use_legend_action.d.ts +1 -1
- package/dist/utils/use_legend_action.d.ts.map +1 -1
- package/dist/utils/use_legend_action.js +1 -1
- package/dist/utils/use_legend_action.js.map +1 -1
- package/package.json +6 -5
- package/dist/chart_types/xy_chart/renderer/canvas/primitives/line.d.ts.map +0 -1
- package/dist/chart_types/xy_chart/renderer/canvas/primitives/line.js.map +0 -1
- package/dist/chart_types/xy_chart/renderer/canvas/primitives/rect.d.ts.map +0 -1
- package/dist/chart_types/xy_chart/renderer/canvas/primitives/rect.js.map +0 -1
- package/dist/chart_types/xy_chart/renderer/canvas/primitives/text.d.ts.map +0 -1
- package/dist/chart_types/xy_chart/renderer/canvas/primitives/text.js.map +0 -1
- package/dist/chart_types/xy_chart/renderer/canvas/utils/debug.d.ts.map +0 -1
- package/dist/chart_types/xy_chart/renderer/canvas/utils/debug.js.map +0 -1
- package/dist/chart_types/xy_chart/state/selectors/get_legend_items_labels.d.ts +0 -2
- package/dist/chart_types/xy_chart/state/selectors/get_legend_items_labels.d.ts.map +0 -1
- package/dist/chart_types/xy_chart/state/selectors/get_legend_items_labels.js +0 -6
- package/dist/chart_types/xy_chart/state/selectors/get_legend_items_labels.js.map +0 -1
- package/dist/state/actions/index.d.ts +0 -2
- package/dist/state/actions/index.d.ts.map +0 -1
- package/dist/state/actions/index.js.map +0 -1
- package/dist/state/utils.d.ts +0 -2
- package/dist/state/utils.d.ts.map +0 -1
- package/dist/state/utils.js +0 -34
- package/dist/state/utils.js.map +0 -1
- /package/dist/chart_types/{xy_chart/renderer/canvas/utils → heatmap/renderer/canvas}/debug.d.ts +0 -0
- /package/dist/{chart_types/xy_chart/renderer → renderers}/canvas/primitives/line.d.ts +0 -0
- /package/dist/{chart_types/xy_chart/renderer → renderers}/canvas/primitives/rect.d.ts +0 -0
- /package/dist/{chart_types/xy_chart/renderer → renderers}/canvas/primitives/text.d.ts +0 -0
|
@@ -40,6 +40,7 @@ const kingly_1 = require("../../common/kingly");
|
|
|
40
40
|
const webgl_constants_1 = require("../../common/webgl_constants");
|
|
41
41
|
const tooltip_1 = require("../../components/tooltip/tooltip");
|
|
42
42
|
const specs_1 = require("../../specs");
|
|
43
|
+
const spec_type_1 = require("../../specs/spec_type");
|
|
43
44
|
const chart_1 = require("../../state/actions/chart");
|
|
44
45
|
const mouse_1 = require("../../state/actions/mouse");
|
|
45
46
|
const can_pin_tooltip_1 = require("../../state/selectors/can_pin_tooltip");
|
|
@@ -47,7 +48,7 @@ const get_accessibility_config_1 = require("../../state/selectors/get_accessibil
|
|
|
47
48
|
const get_chart_theme_1 = require("../../state/selectors/get_chart_theme");
|
|
48
49
|
const get_settings_spec_1 = require("../../state/selectors/get_settings_spec");
|
|
49
50
|
const get_tooltip_spec_1 = require("../../state/selectors/get_tooltip_spec");
|
|
50
|
-
const
|
|
51
|
+
const get_specs_from_store_1 = require("../../state/utils/get_specs_from_store");
|
|
51
52
|
const common_2 = require("../../utils/common");
|
|
52
53
|
const PINCH_ZOOM_CHECK_INTERVAL_MS = 100;
|
|
53
54
|
const SIDE_OVERSHOOT_RATIO = 0.05;
|
|
@@ -71,7 +72,7 @@ const WOBBLE_DURATION = SHOULD_DISABLE_WOBBLE ? 0 : 1000;
|
|
|
71
72
|
const WOBBLE_REPEAT_COUNT = 2;
|
|
72
73
|
const WOBBLE_FREQUENCY = SHOULD_DISABLE_WOBBLE ? 0 : 2 * Math.PI * (WOBBLE_REPEAT_COUNT / WOBBLE_DURATION);
|
|
73
74
|
const NODE_TWEEN_DURATION_MS = 500;
|
|
74
|
-
const unitRowPitch = (position) =>
|
|
75
|
+
const unitRowPitch = (position) => (position.length >= 4 ? (position[1] ?? 0) - (position[3] ?? 0) : 1);
|
|
75
76
|
const initialPixelRowPitch = () => 16;
|
|
76
77
|
const specValueFormatter = (d) => d;
|
|
77
78
|
const browserRootWindow = () => {
|
|
@@ -80,15 +81,12 @@ const browserRootWindow = () => {
|
|
|
80
81
|
rootWindow = rootWindow.parent.window;
|
|
81
82
|
return rootWindow;
|
|
82
83
|
};
|
|
83
|
-
const columnToRowPositions = ({ position1, size1 }, i) => {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
y1: ((_e = position1[i * 2 + 1]) !== null && _e !== void 0 ? _e : 0) + unitRowPitch(position1),
|
|
90
|
-
});
|
|
91
|
-
};
|
|
84
|
+
const columnToRowPositions = ({ position1, size1 }, i) => ({
|
|
85
|
+
x0: position1[i * 2] ?? 0,
|
|
86
|
+
x1: (position1[i * 2] ?? 0) + (size1[i] ?? 0),
|
|
87
|
+
y0: position1[i * 2 + 1] ?? 0,
|
|
88
|
+
y1: (position1[i * 2 + 1] ?? 0) + unitRowPitch(position1),
|
|
89
|
+
});
|
|
92
90
|
const focusForArea = (chartHeight, { x0, x1, y0, y1 }) => {
|
|
93
91
|
const sideOvershoot = SIDE_OVERSHOOT_RATIO * (x1 - x0);
|
|
94
92
|
const unitRowHeight = y1 - y0;
|
|
@@ -106,10 +104,9 @@ const focusForArea = (chartHeight, { x0, x1, y0, y1 }) => {
|
|
|
106
104
|
};
|
|
107
105
|
const focusRect = (columnarViewModel, chartHeight, drilldownDatumIndex) => focusForArea(chartHeight, columnToRowPositions(columnarViewModel, drilldownDatumIndex || 0));
|
|
108
106
|
const getColor = (c, i) => {
|
|
109
|
-
|
|
110
|
-
const
|
|
111
|
-
const
|
|
112
|
-
const b = Math.round(255 * ((_c = c[4 * i + 2]) !== null && _c !== void 0 ? _c : 0));
|
|
107
|
+
const r = Math.round(255 * (c[4 * i] ?? 0));
|
|
108
|
+
const g = Math.round(255 * (c[4 * i + 1] ?? 0));
|
|
109
|
+
const b = Math.round(255 * (c[4 * i + 2] ?? 0));
|
|
113
110
|
const a = c[4 * i + 3];
|
|
114
111
|
return `rgba(${r}, ${g}, ${b}, ${a})`;
|
|
115
112
|
};
|
|
@@ -130,724 +127,43 @@ const getRegExp = (searchString) => {
|
|
|
130
127
|
};
|
|
131
128
|
const isAttributeKey = (keyCandidate) => keyCandidate in shaders_1.attributeLocations;
|
|
132
129
|
class FlameComponent extends react_1.default.Component {
|
|
130
|
+
static displayName = 'Flame';
|
|
131
|
+
ctx = null;
|
|
132
|
+
glContext = null;
|
|
133
|
+
pickTexture = kingly_1.NullTexture;
|
|
134
|
+
glResources = types_1.NULL_GL_RESOURCES;
|
|
135
|
+
glCanvasRef = (0, react_1.createRef)();
|
|
136
|
+
pinchZoomSetInterval = NaN;
|
|
137
|
+
pinchZoomScale = 1;
|
|
138
|
+
pointerX = NaN;
|
|
139
|
+
pointerY = NaN;
|
|
140
|
+
pinnedPointerX = NaN;
|
|
141
|
+
pinnedPointerY = NaN;
|
|
142
|
+
tooltipPinned = false;
|
|
143
|
+
tooltipSelectedSeries = [];
|
|
144
|
+
hoverIndex = NaN;
|
|
145
|
+
tooltipValues = [];
|
|
146
|
+
animationRafId = NaN;
|
|
147
|
+
prevFocusTime = NaN;
|
|
148
|
+
prevNodeTweenTime = NaN;
|
|
149
|
+
currentFocus;
|
|
150
|
+
targetFocus;
|
|
151
|
+
startOfDragX = NaN;
|
|
152
|
+
startOfDragY = NaN;
|
|
153
|
+
startOfDragFocusLeft = NaN;
|
|
154
|
+
startOfDragFocusTop = NaN;
|
|
155
|
+
searchInputRef = (0, react_1.createRef)();
|
|
156
|
+
currentSearchString = '';
|
|
157
|
+
currentSearchHitCount = 0;
|
|
158
|
+
currentColor;
|
|
159
|
+
caseSensitive = false;
|
|
160
|
+
useRegex = false;
|
|
161
|
+
focusedMatchIndex = NaN;
|
|
162
|
+
wobbleTimeLeft = 0;
|
|
163
|
+
wobbleIndex = NaN;
|
|
164
|
+
navigator;
|
|
133
165
|
constructor(props) {
|
|
134
166
|
super(props);
|
|
135
|
-
this.ctx = null;
|
|
136
|
-
this.glContext = null;
|
|
137
|
-
this.pickTexture = kingly_1.NullTexture;
|
|
138
|
-
this.glResources = types_1.NULL_GL_RESOURCES;
|
|
139
|
-
this.glCanvasRef = (0, react_1.createRef)();
|
|
140
|
-
this.pinchZoomSetInterval = NaN;
|
|
141
|
-
this.pinchZoomScale = 1;
|
|
142
|
-
this.pointerX = NaN;
|
|
143
|
-
this.pointerY = NaN;
|
|
144
|
-
this.pinnedPointerX = NaN;
|
|
145
|
-
this.pinnedPointerY = NaN;
|
|
146
|
-
this.tooltipPinned = false;
|
|
147
|
-
this.tooltipSelectedSeries = [];
|
|
148
|
-
this.hoverIndex = NaN;
|
|
149
|
-
this.tooltipValues = [];
|
|
150
|
-
this.animationRafId = NaN;
|
|
151
|
-
this.prevFocusTime = NaN;
|
|
152
|
-
this.prevNodeTweenTime = NaN;
|
|
153
|
-
this.startOfDragX = NaN;
|
|
154
|
-
this.startOfDragY = NaN;
|
|
155
|
-
this.startOfDragFocusLeft = NaN;
|
|
156
|
-
this.startOfDragFocusTop = NaN;
|
|
157
|
-
this.searchInputRef = (0, react_1.createRef)();
|
|
158
|
-
this.currentSearchString = '';
|
|
159
|
-
this.currentSearchHitCount = 0;
|
|
160
|
-
this.caseSensitive = false;
|
|
161
|
-
this.useRegex = false;
|
|
162
|
-
this.focusedMatchIndex = NaN;
|
|
163
|
-
this.wobbleTimeLeft = 0;
|
|
164
|
-
this.wobbleIndex = NaN;
|
|
165
|
-
this.pinTooltip = (pinned) => {
|
|
166
|
-
if (!pinned) {
|
|
167
|
-
this.unpinTooltip(true);
|
|
168
|
-
return;
|
|
169
|
-
}
|
|
170
|
-
this.tooltipPinned = true;
|
|
171
|
-
this.tooltipSelectedSeries = this.tooltipValues;
|
|
172
|
-
};
|
|
173
|
-
this.toggleSelectedTooltipItem = (tooltipValue) => {
|
|
174
|
-
if (!this.tooltipPinned)
|
|
175
|
-
return;
|
|
176
|
-
this.tooltipSelectedSeries = this.tooltipSelectedSeries.length === 0 ? [tooltipValue] : [];
|
|
177
|
-
this.setState({});
|
|
178
|
-
};
|
|
179
|
-
this.setSelectedTooltipItems = (tooltipValues) => {
|
|
180
|
-
this.tooltipSelectedSeries = tooltipValues;
|
|
181
|
-
this.setState({});
|
|
182
|
-
};
|
|
183
|
-
this.setupDevicePixelRatioChangeListener = () => {
|
|
184
|
-
window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`).addEventListener('change', () => {
|
|
185
|
-
this.setState({});
|
|
186
|
-
this.setupDevicePixelRatioChangeListener();
|
|
187
|
-
}, { once: true });
|
|
188
|
-
};
|
|
189
|
-
this.setupViewportScaleChangeListener = () => {
|
|
190
|
-
try {
|
|
191
|
-
if (browserRootWindow().visualViewport) {
|
|
192
|
-
window.clearInterval(this.pinchZoomSetInterval);
|
|
193
|
-
this.pinchZoomSetInterval = window.setInterval(() => {
|
|
194
|
-
var _a, _b;
|
|
195
|
-
const pinchZoomScale = (_b = (_a = browserRootWindow().visualViewport) === null || _a === void 0 ? void 0 : _a.scale) !== null && _b !== void 0 ? _b : 1;
|
|
196
|
-
if (pinchZoomScale !== this.pinchZoomScale) {
|
|
197
|
-
this.pinchZoomScale = pinchZoomScale;
|
|
198
|
-
this.setState({});
|
|
199
|
-
}
|
|
200
|
-
}, PINCH_ZOOM_CHECK_INTERVAL_MS);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
catch {
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
this.componentDidMount = () => {
|
|
207
|
-
var _a;
|
|
208
|
-
this.tryCanvasContext();
|
|
209
|
-
if (this.props.search.text.length > 0 && this.searchInputRef.current) {
|
|
210
|
-
this.searchInputRef.current.value = this.props.search.text;
|
|
211
|
-
this.searchForText(false);
|
|
212
|
-
}
|
|
213
|
-
this.drawCanvas();
|
|
214
|
-
this.props.onChartRendered();
|
|
215
|
-
this.setupDevicePixelRatioChangeListener();
|
|
216
|
-
(_a = this.props.containerRef().current) === null || _a === void 0 ? void 0 : _a.addEventListener('wheel', this.preventScroll, { passive: false });
|
|
217
|
-
};
|
|
218
|
-
this.ensureTextureAndDraw = () => {
|
|
219
|
-
this.ensurePickTexture();
|
|
220
|
-
this.drawCanvas();
|
|
221
|
-
};
|
|
222
|
-
this.componentDidUpdate = ({ chartDimensions, search }) => {
|
|
223
|
-
if (!this.ctx)
|
|
224
|
-
this.tryCanvasContext();
|
|
225
|
-
if (this.tooltipPinned && this.chartDimensionsChanged(chartDimensions)) {
|
|
226
|
-
this.unpinTooltip();
|
|
227
|
-
}
|
|
228
|
-
this.bindControls();
|
|
229
|
-
if (search.text !== this.props.search.text && this.searchInputRef.current) {
|
|
230
|
-
this.searchInputRef.current.value = this.props.search.text;
|
|
231
|
-
this.searchForText(false);
|
|
232
|
-
}
|
|
233
|
-
this.ensureTextureAndDraw();
|
|
234
|
-
};
|
|
235
|
-
this.pointerInMinimap = (x, y) => x === (0, common_2.clamp)(x, this.getMinimapLeft(), this.getMinimapLeft() + this.getMinimapWidth()) &&
|
|
236
|
-
y === (0, common_2.clamp)(y, this.getMinimapTop(), this.getMinimapTop() + this.getMinimapHeight());
|
|
237
|
-
this.datumAtXY = (x, y) => this.glContext ? colorToDatumIndex((0, kingly_1.readPixel)(this.glContext, x, y)) : NaN;
|
|
238
|
-
this.getHoveredDatumIndex = () => {
|
|
239
|
-
const pr = window.devicePixelRatio * this.pinchZoomScale;
|
|
240
|
-
const x = this.tooltipPinned ? this.pinnedPointerX : this.pointerX;
|
|
241
|
-
const y = this.tooltipPinned ? this.pinnedPointerY : this.pointerY;
|
|
242
|
-
return this.datumAtXY(pr * x, pr * (this.props.chartDimensions.height - y));
|
|
243
|
-
};
|
|
244
|
-
this.getDragDistanceX = () => this.pointerX - this.startOfDragX;
|
|
245
|
-
this.getDragDistanceY = () => -(this.pointerY - this.startOfDragY);
|
|
246
|
-
this.isDragging = ({ buttons }) => buttons & LEFT_MOUSE_BUTTON;
|
|
247
|
-
this.handleMouseHoverMove = (e) => {
|
|
248
|
-
if (!this.isDragging(e)) {
|
|
249
|
-
e.stopPropagation();
|
|
250
|
-
this.updatePointerLocation(e);
|
|
251
|
-
if (!this.tooltipPinned) {
|
|
252
|
-
this.updateHoverIndex();
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
};
|
|
256
|
-
this.handleMouseDragMove = (e) => {
|
|
257
|
-
e.stopPropagation();
|
|
258
|
-
this.updatePointerLocation(e);
|
|
259
|
-
if (this.isDragging(e)) {
|
|
260
|
-
const dragInMinimap = this.pointerInMinimap(this.startOfDragX, this.startOfDragY);
|
|
261
|
-
const focusMoveDirection = dragInMinimap ? 1 : -1;
|
|
262
|
-
const { x0, x1, y0, y1 } = this.currentFocus;
|
|
263
|
-
const focusWidth = x1 - x0;
|
|
264
|
-
const focusHeight = y1 - y0;
|
|
265
|
-
if (Number.isNaN(this.startOfDragFocusLeft))
|
|
266
|
-
this.startOfDragFocusLeft = x0;
|
|
267
|
-
if (Number.isNaN(this.startOfDragFocusTop))
|
|
268
|
-
this.startOfDragFocusTop = y0;
|
|
269
|
-
const dragDistanceX = this.getDragDistanceX();
|
|
270
|
-
const dragDistanceY = this.getDragDistanceY();
|
|
271
|
-
const { width: chartWidth, height: chartHeight } = this.props.chartDimensions;
|
|
272
|
-
const focusChartWidth = chartWidth - draw_a_frame_1.PADDING_LEFT - draw_a_frame_1.PADDING_RIGHT;
|
|
273
|
-
const focusChartHeight = chartHeight - draw_a_frame_1.PADDING_TOP - draw_a_frame_1.PADDING_BOTTOM;
|
|
274
|
-
const dragSpeedX = (dragInMinimap ? MINIMAP_SIZE_RATIO_X / focusWidth : 1) / focusChartWidth;
|
|
275
|
-
const dragSpeedY = (dragInMinimap ? MINIMAP_SIZE_RATIO_Y / focusHeight : 1) / focusChartHeight;
|
|
276
|
-
const deltaIntentX = focusMoveDirection * dragDistanceX * dragSpeedX * focusWidth;
|
|
277
|
-
const deltaIntentY = focusMoveDirection * dragDistanceY * dragSpeedY * focusHeight;
|
|
278
|
-
const deltaCorrectionX = deltaIntentX > 0
|
|
279
|
-
? Math.min(0, 1 - (this.startOfDragFocusLeft + focusWidth + deltaIntentX))
|
|
280
|
-
: -Math.min(0, this.startOfDragFocusLeft + deltaIntentX);
|
|
281
|
-
const deltaCorrectionY = deltaIntentY > 0
|
|
282
|
-
? Math.min(0, 1 - (this.startOfDragFocusTop + focusHeight + deltaIntentY))
|
|
283
|
-
: -Math.min(0, this.startOfDragFocusTop + deltaIntentY);
|
|
284
|
-
const deltaX = deltaIntentX + deltaCorrectionX;
|
|
285
|
-
const deltaY = deltaIntentY + deltaCorrectionY;
|
|
286
|
-
const newX0 = (0, common_2.clamp)(this.startOfDragFocusLeft + deltaX, 0, 1);
|
|
287
|
-
const newX1 = (0, common_2.clamp)(this.startOfDragFocusLeft + focusWidth + deltaX, 0, 1);
|
|
288
|
-
const newY0 = (0, common_2.clamp)(this.startOfDragFocusTop + deltaY, 0, 1);
|
|
289
|
-
const newY1 = (0, common_2.clamp)(this.startOfDragFocusTop + focusHeight + deltaY, 0, 1);
|
|
290
|
-
const newFocus = { x0: newX0, x1: newX1, y0: newY0, y1: newY1 };
|
|
291
|
-
this.currentFocus = newFocus;
|
|
292
|
-
this.targetFocus = newFocus;
|
|
293
|
-
this.navigator.add({ ...newFocus, index: NaN });
|
|
294
|
-
this.smartDraw();
|
|
295
|
-
}
|
|
296
|
-
};
|
|
297
|
-
this.clearDrag = () => {
|
|
298
|
-
this.startOfDragX = NaN;
|
|
299
|
-
this.startOfDragY = NaN;
|
|
300
|
-
this.startOfDragFocusLeft = NaN;
|
|
301
|
-
this.startOfDragFocusTop = NaN;
|
|
302
|
-
};
|
|
303
|
-
this.resetDrag = () => {
|
|
304
|
-
this.startOfDragX = this.pointerX;
|
|
305
|
-
this.startOfDragY = this.pointerY;
|
|
306
|
-
};
|
|
307
|
-
this.handleMouseDown = (e) => {
|
|
308
|
-
e.stopPropagation();
|
|
309
|
-
if (e.button === constants_1.SECONDARY_BUTTON || e.ctrlKey)
|
|
310
|
-
return;
|
|
311
|
-
if (Number.isNaN(this.pointerX + this.pointerY))
|
|
312
|
-
return;
|
|
313
|
-
if (this.tooltipPinned)
|
|
314
|
-
return;
|
|
315
|
-
this.resetDrag();
|
|
316
|
-
window.addEventListener('mousemove', this.handleMouseDragMove, { passive: true });
|
|
317
|
-
window.addEventListener('mouseup', this.handleMouseUp, { passive: true });
|
|
318
|
-
};
|
|
319
|
-
this.handleContextMenu = (e) => {
|
|
320
|
-
e.stopPropagation();
|
|
321
|
-
e.preventDefault();
|
|
322
|
-
if (this.tooltipPinned) {
|
|
323
|
-
this.handleUnpinningTooltip();
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
if (!Number.isFinite(this.getHoveredDatumIndex())) {
|
|
327
|
-
return;
|
|
328
|
-
}
|
|
329
|
-
window.addEventListener('keyup', this.handleKeyUp);
|
|
330
|
-
window.addEventListener('click', this.handleUnpinningTooltip);
|
|
331
|
-
window.addEventListener('visibilitychange', this.handleUnpinningTooltip);
|
|
332
|
-
this.pinTooltip(true);
|
|
333
|
-
this.setState({});
|
|
334
|
-
};
|
|
335
|
-
this.handleMouseUp = (e) => {
|
|
336
|
-
e.stopPropagation();
|
|
337
|
-
window.removeEventListener('mousemove', this.handleMouseDragMove);
|
|
338
|
-
window.removeEventListener('mouseup', this.handleMouseUp);
|
|
339
|
-
if (this.tooltipPinned) {
|
|
340
|
-
this.unpinTooltip();
|
|
341
|
-
this.clearDrag();
|
|
342
|
-
return;
|
|
343
|
-
}
|
|
344
|
-
this.updatePointerLocation(e);
|
|
345
|
-
const dragDistanceX = this.getDragDistanceX();
|
|
346
|
-
const dragDistanceY = this.getDragDistanceY();
|
|
347
|
-
if (!dragDistanceX && !dragDistanceY) {
|
|
348
|
-
const hoveredDatumIndex = this.getHoveredDatumIndex();
|
|
349
|
-
const isDoubleClick = e.detail > 1;
|
|
350
|
-
const hasClickedOnRectangle = Number.isFinite(hoveredDatumIndex);
|
|
351
|
-
const mustFocus = SINGLE_CLICK_EMPTY_FOCUS || isDoubleClick !== hasClickedOnRectangle;
|
|
352
|
-
const isContextClick = e.button === constants_1.SECONDARY_BUTTON || e.ctrlKey;
|
|
353
|
-
if (mustFocus && !isContextClick && !this.pointerInMinimap(this.pointerX, this.pointerY)) {
|
|
354
|
-
const rect = focusRect(this.props.columnarViewModel, this.props.chartDimensions.height, hoveredDatumIndex);
|
|
355
|
-
this.navigator.add({ ...rect, index: hoveredDatumIndex });
|
|
356
|
-
this.focusOnNode(hoveredDatumIndex);
|
|
357
|
-
this.props.onElementClick([{ vmIndex: hoveredDatumIndex }]);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
this.clearDrag();
|
|
361
|
-
this.setState({});
|
|
362
|
-
};
|
|
363
|
-
this.handleUnpinningTooltip = () => {
|
|
364
|
-
window.removeEventListener('keyup', this.handleKeyUp);
|
|
365
|
-
window.removeEventListener('click', this.handleUnpinningTooltip);
|
|
366
|
-
window.removeEventListener('visibilitychange', this.handleUnpinningTooltip);
|
|
367
|
-
this.pinTooltip(false);
|
|
368
|
-
};
|
|
369
|
-
this.handleKeyUp = ({ key }) => {
|
|
370
|
-
if (!FlameComponent.watchedKeys.includes(key))
|
|
371
|
-
return;
|
|
372
|
-
window.removeEventListener('keyup', this.handleKeyUp);
|
|
373
|
-
this.unpinTooltip();
|
|
374
|
-
};
|
|
375
|
-
this.handleMouseLeave = (e) => {
|
|
376
|
-
e.stopPropagation();
|
|
377
|
-
if (!this.tooltipPinned) {
|
|
378
|
-
this.smartDraw();
|
|
379
|
-
}
|
|
380
|
-
};
|
|
381
|
-
this.preventScroll = (e) => e.metaKey === IS_META_REQUIRED_FOR_ZOOM && e.preventDefault();
|
|
382
|
-
this.handleWheel = (e) => {
|
|
383
|
-
if (e.metaKey !== IS_META_REQUIRED_FOR_ZOOM)
|
|
384
|
-
return;
|
|
385
|
-
this.unpinTooltip();
|
|
386
|
-
this.updatePointerLocation(e);
|
|
387
|
-
const { x0, x1, y0, y1 } = this.currentFocus;
|
|
388
|
-
const wheelDelta = -e.deltaY;
|
|
389
|
-
const delta = wheelDelta * ZOOM_SPEED;
|
|
390
|
-
const unitX = this.pointerX / this.props.chartDimensions.width;
|
|
391
|
-
const unitY = (this.props.chartDimensions.height - this.pointerY) / this.props.chartDimensions.height;
|
|
392
|
-
const zoomOut = delta <= 0;
|
|
393
|
-
const midX = Math.abs(x0) < draw_a_frame_1.EPSILON && (zoomOut || this.pointerX < ZOOM_FROM_EDGE_BAND_LEFT)
|
|
394
|
-
? 0
|
|
395
|
-
: Math.abs(x1 - 1) < draw_a_frame_1.EPSILON &&
|
|
396
|
-
(zoomOut || this.pointerX > this.props.chartDimensions.width - ZOOM_FROM_EDGE_BAND_RIGHT)
|
|
397
|
-
? 1
|
|
398
|
-
: (0, common_2.clamp)(x0 + unitX * Math.abs(x1 - x0), 0, 1);
|
|
399
|
-
const midY = Math.abs(y0) < draw_a_frame_1.EPSILON &&
|
|
400
|
-
(zoomOut || this.pointerY > this.props.chartDimensions.height - ZOOM_FROM_EDGE_BAND_BOTTOM)
|
|
401
|
-
? 0
|
|
402
|
-
: Math.abs(y1 - 1) < draw_a_frame_1.EPSILON && (zoomOut || this.pointerY < ZOOM_FROM_EDGE_BAND_TOP)
|
|
403
|
-
? 1
|
|
404
|
-
: (0, common_2.clamp)(y0 + unitY * Math.abs(y1 - y0), 0, 1);
|
|
405
|
-
const targetX0 = (0, common_2.clamp)(x0 - delta * (x0 - midX), 0, 1);
|
|
406
|
-
const targetX1 = (0, common_2.clamp)(x1 + delta * (midX - x1), 0, 1);
|
|
407
|
-
const targetY0 = (0, common_2.clamp)(y0 - delta * (y0 - midY), 0, 1);
|
|
408
|
-
const targetY1 = (0, common_2.clamp)(y1 + delta * (midY - y1), 0, 1);
|
|
409
|
-
const newX0 = Math.min(targetX0, midX);
|
|
410
|
-
const newX1 = Math.max(targetX1, midX);
|
|
411
|
-
const newY0 = Math.min(targetY0, midY);
|
|
412
|
-
const newY1 = Math.max(targetY1, midY);
|
|
413
|
-
const xZoom = (e.ctrlKey || !e.altKey) && newX1 - newX0 >= DEEPEST_ZOOM_RATIO;
|
|
414
|
-
const yZoom = (e.ctrlKey || e.altKey) && newY1 - newY0 >= unitRowPitch(this.props.columnarViewModel.position1);
|
|
415
|
-
if (xZoom || yZoom) {
|
|
416
|
-
const newFocus = {
|
|
417
|
-
x0: xZoom ? newX0 : x0,
|
|
418
|
-
x1: xZoom ? newX1 : x1,
|
|
419
|
-
y0: yZoom ? newY0 : y0,
|
|
420
|
-
y1: yZoom ? newY1 : y1,
|
|
421
|
-
};
|
|
422
|
-
this.navigator.add({ ...newFocus, index: NaN });
|
|
423
|
-
this.currentFocus = newFocus;
|
|
424
|
-
this.targetFocus = newFocus;
|
|
425
|
-
}
|
|
426
|
-
this.smartDraw();
|
|
427
|
-
};
|
|
428
|
-
this.focusOnAllMatches = () => {
|
|
429
|
-
var _a, _b, _c, _d, _e, _f;
|
|
430
|
-
this.currentSearchHitCount = 0;
|
|
431
|
-
const searchString = this.currentSearchString;
|
|
432
|
-
const customizedSearchString = this.caseSensitive ? searchString : searchString.toLowerCase();
|
|
433
|
-
const regex = this.useRegex && getRegExp(searchString);
|
|
434
|
-
const columns = this.props.columnarViewModel;
|
|
435
|
-
this.currentColor = new Float32Array(columns.color);
|
|
436
|
-
const labels = columns.label;
|
|
437
|
-
const size = columns.size1;
|
|
438
|
-
const position = columns.position1;
|
|
439
|
-
const rowHeight = unitRowPitch(position);
|
|
440
|
-
const datumCount = labels.length;
|
|
441
|
-
let x0 = Infinity;
|
|
442
|
-
let x1 = -Infinity;
|
|
443
|
-
let y0 = Infinity;
|
|
444
|
-
let y1 = -Infinity;
|
|
445
|
-
for (let i = 0; i < datumCount; i++) {
|
|
446
|
-
const label = this.caseSensitive ? labels[i] : (_a = labels[i]) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
447
|
-
if (regex ? label === null || label === void 0 ? void 0 : label.match(regex) : label === null || label === void 0 ? void 0 : label.includes(customizedSearchString)) {
|
|
448
|
-
this.currentSearchHitCount++;
|
|
449
|
-
x0 = Math.min(x0, (_b = position[2 * i]) !== null && _b !== void 0 ? _b : 0);
|
|
450
|
-
x1 = Math.max(x1, ((_c = position[2 * i]) !== null && _c !== void 0 ? _c : 0) + ((_d = size[i]) !== null && _d !== void 0 ? _d : 0));
|
|
451
|
-
y0 = Math.min(y0, (_e = position[2 * i + 1]) !== null && _e !== void 0 ? _e : 0);
|
|
452
|
-
y1 = Math.max(y1, ((_f = position[2 * i + 1]) !== null && _f !== void 0 ? _f : 0) + rowHeight);
|
|
453
|
-
}
|
|
454
|
-
else if (this.currentColor[4 * i + 3] !== undefined) {
|
|
455
|
-
this.currentColor[4 * i + 3] *= 0.25;
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
if (Number.isFinite(x0) && searchString.length > 0) {
|
|
459
|
-
Object.assign(this.targetFocus, focusForArea(this.props.chartDimensions.height, { x0, x1, y0, y1 }));
|
|
460
|
-
}
|
|
461
|
-
};
|
|
462
|
-
this.uploadSearchColors = () => {
|
|
463
|
-
const colorSetter = this.glResources.attributes.get('color');
|
|
464
|
-
if (this.glContext && colorSetter && this.currentColor.length === this.props.columnarViewModel.color.length) {
|
|
465
|
-
(0, upload_to_webgl_1.uploadToWebgl)(this.glContext, new Map([['color', colorSetter]]), { color: this.currentColor });
|
|
466
|
-
}
|
|
467
|
-
};
|
|
468
|
-
this.searchForText = (force) => {
|
|
469
|
-
const input = this.searchInputRef.current;
|
|
470
|
-
const searchString = input === null || input === void 0 ? void 0 : input.value;
|
|
471
|
-
if (!input || typeof searchString !== 'string' || (searchString === this.currentSearchString && !force))
|
|
472
|
-
return;
|
|
473
|
-
this.currentSearchString = searchString;
|
|
474
|
-
this.focusOnAllMatches();
|
|
475
|
-
this.uploadSearchColors();
|
|
476
|
-
this.focusedMatchIndex = NaN;
|
|
477
|
-
this.setState({});
|
|
478
|
-
};
|
|
479
|
-
this.handleEnterKey = (e) => {
|
|
480
|
-
e.stopPropagation();
|
|
481
|
-
if (e.key === 'Enter') {
|
|
482
|
-
if (e.shiftKey) {
|
|
483
|
-
this.previousHit();
|
|
484
|
-
}
|
|
485
|
-
else {
|
|
486
|
-
this.nextHit();
|
|
487
|
-
}
|
|
488
|
-
return true;
|
|
489
|
-
}
|
|
490
|
-
return false;
|
|
491
|
-
};
|
|
492
|
-
this.clearSearchText = () => {
|
|
493
|
-
if (!this.searchInputRef.current)
|
|
494
|
-
return;
|
|
495
|
-
this.searchInputRef.current.value = '';
|
|
496
|
-
this.searchForText(false);
|
|
497
|
-
};
|
|
498
|
-
this.handleEscapeKey = (e) => {
|
|
499
|
-
if (e.key === 'Escape') {
|
|
500
|
-
this.clearSearchText();
|
|
501
|
-
}
|
|
502
|
-
};
|
|
503
|
-
this.handleSearchFieldKeyPress = (e) => {
|
|
504
|
-
if (this.handleEnterKey(e)) {
|
|
505
|
-
e.stopPropagation();
|
|
506
|
-
}
|
|
507
|
-
};
|
|
508
|
-
this.focusOnHit = () => {
|
|
509
|
-
var _a;
|
|
510
|
-
if (Number.isNaN(this.focusedMatchIndex)) {
|
|
511
|
-
this.focusOnAllMatches();
|
|
512
|
-
}
|
|
513
|
-
else {
|
|
514
|
-
let datumIndex = NaN;
|
|
515
|
-
let hitEnumerator = -1;
|
|
516
|
-
const searchString = this.currentSearchString;
|
|
517
|
-
const customizedSearchString = this.caseSensitive ? searchString : searchString.toLowerCase();
|
|
518
|
-
const regex = this.useRegex && getRegExp(searchString);
|
|
519
|
-
const labels = this.props.columnarViewModel.label;
|
|
520
|
-
for (let i = 0; i < labels.length; i++) {
|
|
521
|
-
const label = this.caseSensitive ? labels[i] : (_a = labels[i]) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
522
|
-
if (regex ? label === null || label === void 0 ? void 0 : label.match(regex) : label === null || label === void 0 ? void 0 : label.includes(customizedSearchString)) {
|
|
523
|
-
datumIndex = i;
|
|
524
|
-
hitEnumerator++;
|
|
525
|
-
if (hitEnumerator === this.focusedMatchIndex)
|
|
526
|
-
break;
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
if (hitEnumerator >= 0) {
|
|
530
|
-
this.targetFocus = focusRect(this.props.columnarViewModel, this.props.chartDimensions.height, datumIndex);
|
|
531
|
-
this.prevFocusTime = NaN;
|
|
532
|
-
this.hoverIndex = NaN;
|
|
533
|
-
this.wobbleTimeLeft = WOBBLE_DURATION;
|
|
534
|
-
this.wobbleIndex = datumIndex;
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
};
|
|
538
|
-
this.previousHit = () => {
|
|
539
|
-
const hitCount = this.currentSearchHitCount;
|
|
540
|
-
if (!this.currentSearchString || hitCount === 0)
|
|
541
|
-
return;
|
|
542
|
-
this.focusedMatchIndex = Number.isNaN(this.focusedMatchIndex)
|
|
543
|
-
? hitCount - 1
|
|
544
|
-
: this.focusedMatchIndex === 0
|
|
545
|
-
? NaN
|
|
546
|
-
: this.focusedMatchIndex - 1;
|
|
547
|
-
this.focusOnHit();
|
|
548
|
-
this.setState({});
|
|
549
|
-
};
|
|
550
|
-
this.nextHit = () => {
|
|
551
|
-
const hitCount = this.currentSearchHitCount;
|
|
552
|
-
if (!this.currentSearchString || hitCount === 0)
|
|
553
|
-
return;
|
|
554
|
-
this.focusedMatchIndex = this.focusedMatchIndex = Number.isNaN(this.focusedMatchIndex)
|
|
555
|
-
? 0
|
|
556
|
-
: this.focusedMatchIndex === hitCount - 1
|
|
557
|
-
? NaN
|
|
558
|
-
: this.focusedMatchIndex + 1;
|
|
559
|
-
this.focusOnHit();
|
|
560
|
-
this.setState({});
|
|
561
|
-
};
|
|
562
|
-
this.render = () => {
|
|
563
|
-
const { forwardStageRef, chartDimensions: { width: requestedWidth, height: requestedHeight }, a11ySettings, debugHistory, theme, canPinTooltip, } = this.props;
|
|
564
|
-
const width = (0, common_1.roundUpSize)(requestedWidth);
|
|
565
|
-
const height = (0, common_1.roundUpSize)(requestedHeight);
|
|
566
|
-
const style = {
|
|
567
|
-
width,
|
|
568
|
-
height,
|
|
569
|
-
top: 0,
|
|
570
|
-
left: 0,
|
|
571
|
-
padding: 0,
|
|
572
|
-
margin: 0,
|
|
573
|
-
border: 0,
|
|
574
|
-
position: 'absolute',
|
|
575
|
-
cursor: this.getActiveCursor(),
|
|
576
|
-
};
|
|
577
|
-
const dpr = window.devicePixelRatio * this.pinchZoomScale;
|
|
578
|
-
const canvasWidth = width * dpr;
|
|
579
|
-
const canvasHeight = height * dpr;
|
|
580
|
-
const hitCount = this.currentSearchHitCount;
|
|
581
|
-
const { textColor, buttonDisabledTextColor, buttonBackgroundColor, buttonDisabledBackgroundColor, buttonTextColor, } = theme.navigation;
|
|
582
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
583
|
-
react_1.default.createElement("figure", { "aria-labelledby": a11ySettings.labelId, "aria-describedby": a11ySettings.descriptionId },
|
|
584
|
-
react_1.default.createElement("canvas", { ref: this.glCanvasRef, className: "echCanvasRenderer", width: canvasWidth, height: canvasHeight, style: style, role: "presentation" }),
|
|
585
|
-
react_1.default.createElement("canvas", { ref: forwardStageRef, tabIndex: 0, className: "echCanvasRenderer", width: canvasWidth, height: canvasHeight, onMouseMove: this.handleMouseHoverMove, onMouseDown: this.handleMouseDown, onContextMenu: canPinTooltip ? this.handleContextMenu : undefined, onMouseLeave: this.handleMouseLeave, onKeyPress: this.handleEnterKey, onKeyUp: this.handleEscapeKey, onWheel: this.handleWheel, style: { ...style, outline: 'none' }, role: "presentation" })),
|
|
586
|
-
react_1.default.createElement("div", { style: {
|
|
587
|
-
position: 'absolute',
|
|
588
|
-
transform: `translateY(${this.props.chartDimensions.height - draw_a_frame_1.PADDING_BOTTOM + 4}px)`,
|
|
589
|
-
} },
|
|
590
|
-
react_1.default.createElement("label", { title: "Navigate back", style: {
|
|
591
|
-
color: this.navigator.canNavBackward() ? buttonTextColor : buttonDisabledTextColor,
|
|
592
|
-
fontWeight: 500,
|
|
593
|
-
marginLeft: 16,
|
|
594
|
-
marginRight: 4,
|
|
595
|
-
borderRadius: 4,
|
|
596
|
-
paddingInline: 4,
|
|
597
|
-
width: 18,
|
|
598
|
-
display: 'inline-block',
|
|
599
|
-
height: 16,
|
|
600
|
-
verticalAlign: 'middle',
|
|
601
|
-
textAlign: 'center',
|
|
602
|
-
backgroundColor: this.navigator.canNavBackward() ? buttonBackgroundColor : buttonDisabledBackgroundColor,
|
|
603
|
-
} },
|
|
604
|
-
"\u1438",
|
|
605
|
-
react_1.default.createElement("input", { type: "button", tabIndex: 0, onClick: () => this.focusOnNavElement(this.navigator.navBackward()), style: { display: 'none' } })),
|
|
606
|
-
react_1.default.createElement("label", { title: "Reset", style: {
|
|
607
|
-
color: buttonTextColor,
|
|
608
|
-
fontWeight: 500,
|
|
609
|
-
paddingInline: 4,
|
|
610
|
-
borderRadius: 4,
|
|
611
|
-
verticalAlign: 'middle',
|
|
612
|
-
backgroundColor: buttonBackgroundColor,
|
|
613
|
-
} },
|
|
614
|
-
"\u25B2",
|
|
615
|
-
react_1.default.createElement("input", { type: "button", tabIndex: 0, onClick: () => this.resetFocus(), style: { display: 'none' } })),
|
|
616
|
-
react_1.default.createElement("label", { title: "Navigate forward", style: {
|
|
617
|
-
color: this.navigator.canNavForward() ? buttonTextColor : buttonDisabledTextColor,
|
|
618
|
-
fontWeight: 500,
|
|
619
|
-
marginLeft: 4,
|
|
620
|
-
marginRight: 16,
|
|
621
|
-
borderRadius: 4,
|
|
622
|
-
paddingInline: 4,
|
|
623
|
-
verticalAlign: 'middle',
|
|
624
|
-
backgroundColor: this.navigator.canNavForward() ? buttonBackgroundColor : buttonDisabledBackgroundColor,
|
|
625
|
-
} },
|
|
626
|
-
"\u1433",
|
|
627
|
-
react_1.default.createElement("input", { type: "button", tabIndex: 0, onClick: () => this.focusOnNavElement(this.navigator.navForward()), style: { display: 'none' } })),
|
|
628
|
-
react_1.default.createElement("input", { ref: this.searchInputRef, title: "Search string or regex pattern", size: 16, type: "text", tabIndex: 0, placeholder: "Search string", onKeyPress: this.handleSearchFieldKeyPress, onKeyUp: this.handleEscapeKey, onChange: (e) => {
|
|
629
|
-
this.searchForText(false);
|
|
630
|
-
this.props.onSeachTextChange(e.currentTarget.value);
|
|
631
|
-
}, style: {
|
|
632
|
-
border: 'none',
|
|
633
|
-
padding: 3,
|
|
634
|
-
outline: 'none',
|
|
635
|
-
color: textColor,
|
|
636
|
-
background: 'transparent',
|
|
637
|
-
} }),
|
|
638
|
-
react_1.default.createElement("label", { title: "Clear text", style: {
|
|
639
|
-
color: buttonTextColor,
|
|
640
|
-
background: buttonBackgroundColor,
|
|
641
|
-
fontWeight: 500,
|
|
642
|
-
paddingInline: 4,
|
|
643
|
-
marginInline: 4,
|
|
644
|
-
borderRadius: 4,
|
|
645
|
-
opacity: this.currentSearchString ? 1 : 0,
|
|
646
|
-
transition: 'opacity 250ms ease-in-out',
|
|
647
|
-
} },
|
|
648
|
-
"Clear",
|
|
649
|
-
react_1.default.createElement("input", { type: "button", tabIndex: 0, onClick: () => {
|
|
650
|
-
if (this.currentSearchString && this.searchInputRef.current) {
|
|
651
|
-
this.clearSearchText();
|
|
652
|
-
this.props.onSeachTextChange('');
|
|
653
|
-
}
|
|
654
|
-
}, style: { display: 'none' } })),
|
|
655
|
-
react_1.default.createElement("label", { title: "Case sensitivity (highlighted: case sensitive)", style: {
|
|
656
|
-
backgroundColor: this.caseSensitive && !this.useRegex ? buttonBackgroundColor : buttonDisabledBackgroundColor,
|
|
657
|
-
color: this.caseSensitive && !this.useRegex ? buttonTextColor : buttonDisabledTextColor,
|
|
658
|
-
fontWeight: 500,
|
|
659
|
-
paddingInline: 4,
|
|
660
|
-
marginInline: 4,
|
|
661
|
-
borderRadius: 4,
|
|
662
|
-
opacity: this.currentSearchString ? 1 : 0,
|
|
663
|
-
transition: 'opacity 250ms ease-in-out',
|
|
664
|
-
} },
|
|
665
|
-
"Cc",
|
|
666
|
-
react_1.default.createElement("input", { type: "button", tabIndex: 0, onClick: () => {
|
|
667
|
-
if (!this.currentSearchString)
|
|
668
|
-
return;
|
|
669
|
-
this.caseSensitive = !this.caseSensitive;
|
|
670
|
-
this.searchForText(true);
|
|
671
|
-
}, style: { display: 'none' } })),
|
|
672
|
-
react_1.default.createElement("label", { title: "Regex matching (highlighted: use regex)", style: {
|
|
673
|
-
color: this.useRegex ? buttonTextColor : buttonDisabledTextColor,
|
|
674
|
-
backgroundColor: this.useRegex ? buttonBackgroundColor : buttonDisabledBackgroundColor,
|
|
675
|
-
fontWeight: 500,
|
|
676
|
-
paddingInline: 4,
|
|
677
|
-
marginInline: 4,
|
|
678
|
-
borderRadius: 4,
|
|
679
|
-
opacity: this.currentSearchString ? 1 : 0,
|
|
680
|
-
transition: 'opacity 250ms ease-in-out',
|
|
681
|
-
} },
|
|
682
|
-
". *",
|
|
683
|
-
react_1.default.createElement("input", { type: "button", tabIndex: 0, onClick: () => {
|
|
684
|
-
if (!this.currentSearchString)
|
|
685
|
-
return;
|
|
686
|
-
this.useRegex = !this.useRegex;
|
|
687
|
-
this.searchForText(true);
|
|
688
|
-
}, style: { display: 'none' } })),
|
|
689
|
-
react_1.default.createElement("label", { title: "Previous hit", style: {
|
|
690
|
-
backgroundColor: hitCount ? buttonBackgroundColor : buttonDisabledBackgroundColor,
|
|
691
|
-
color: hitCount ? buttonTextColor : buttonDisabledTextColor,
|
|
692
|
-
fontWeight: 500,
|
|
693
|
-
marginLeft: 16,
|
|
694
|
-
marginRight: 4,
|
|
695
|
-
paddingInline: 4,
|
|
696
|
-
borderRadius: 4,
|
|
697
|
-
opacity: this.currentSearchString ? 1 : 0,
|
|
698
|
-
transition: 'opacity 250ms ease-in-out',
|
|
699
|
-
verticalAlign: 'middle',
|
|
700
|
-
} },
|
|
701
|
-
"\u25C0",
|
|
702
|
-
react_1.default.createElement("input", { type: "button", tabIndex: 0, onClick: this.previousHit, style: { display: 'none' } })),
|
|
703
|
-
react_1.default.createElement("label", { title: "Next hit", style: {
|
|
704
|
-
backgroundColor: hitCount ? buttonBackgroundColor : buttonDisabledBackgroundColor,
|
|
705
|
-
color: hitCount ? buttonTextColor : buttonDisabledTextColor,
|
|
706
|
-
fontWeight: 500,
|
|
707
|
-
paddingInline: 4,
|
|
708
|
-
borderRadius: 4,
|
|
709
|
-
opacity: this.currentSearchString ? 1 : 0,
|
|
710
|
-
transition: 'opacity 250ms ease-in-out',
|
|
711
|
-
verticalAlign: 'middle',
|
|
712
|
-
} },
|
|
713
|
-
"\u25B6",
|
|
714
|
-
react_1.default.createElement("input", { type: "button", tabIndex: 0, onClick: this.nextHit, style: { display: 'none' } })),
|
|
715
|
-
react_1.default.createElement("p", { style: {
|
|
716
|
-
float: 'right',
|
|
717
|
-
padding: 3,
|
|
718
|
-
opacity: this.currentSearchString ? 1 : 0,
|
|
719
|
-
transition: 'opacity 250ms ease-in-out',
|
|
720
|
-
color: textColor,
|
|
721
|
-
} }, `Match${Number.isNaN(this.focusedMatchIndex) ? 'es:' : `: ${this.focusedMatchIndex + 1} /`} ${hitCount}`)),
|
|
722
|
-
react_1.default.createElement(tooltip_1.BasicTooltip, { canPinTooltip: canPinTooltip, onPointerMove: () => ({ type: mouse_1.ON_POINTER_MOVE, position: { x: NaN, y: NaN }, time: NaN }), position: this.tooltipPinned
|
|
723
|
-
? { x: this.pinnedPointerX, y: this.pinnedPointerY, width: 0, height: 0 }
|
|
724
|
-
: { x: this.pointerX, y: this.pointerY, width: 0, height: 0 }, pinned: this.tooltipPinned, selected: this.tooltipSelectedSeries, pinTooltip: this.pinTooltip, toggleSelectedTooltipItem: this.toggleSelectedTooltipItem, setSelectedTooltipItems: this.setSelectedTooltipItems, visible: this.tooltipPinned || (this.props.tooltipRequired && this.hoverIndex >= 0 && !(this.wobbleTimeLeft > 0)), info: {
|
|
725
|
-
header: null,
|
|
726
|
-
values: this.tooltipValues,
|
|
727
|
-
}, getChartContainerRef: this.props.containerRef }),
|
|
728
|
-
debugHistory && (react_1.default.createElement("div", { style: {
|
|
729
|
-
position: 'absolute',
|
|
730
|
-
transform: `translate(20px, 20px)`,
|
|
731
|
-
background: 'beige',
|
|
732
|
-
opacity: 0.8,
|
|
733
|
-
} },
|
|
734
|
-
"history:",
|
|
735
|
-
react_1.default.createElement("ul", null, this.navigator.queue().map((d, i) => {
|
|
736
|
-
return (react_1.default.createElement("li", { key: `${d.index}-${i}` }, `${Number.isNaN(d.index) ? 'ZOOM/PAN' : d.index}${this.navigator.index() === i ? '⬅' : ''}`));
|
|
737
|
-
}))))));
|
|
738
|
-
};
|
|
739
|
-
this.drawCanvas = () => {
|
|
740
|
-
if (!this.ctx || !this.glContext || !this.pickTexture)
|
|
741
|
-
return;
|
|
742
|
-
const renderFrame = (0, draw_a_frame_1.drawFrame)(this.ctx, this.glContext, this.props.chartDimensions.width, this.props.chartDimensions.height, this.getMinimapWidth(), this.getMinimapHeight(), this.getMinimapLeft(), this.getMinimapTop(), window.devicePixelRatio * this.pinchZoomScale, this.props.columnarViewModel, this.pickTexture, this.glResources.pickTextureRenderer, this.glResources.roundedRectRenderer, this.hoverIndex, unitRowPitch(this.props.columnarViewModel.position1), this.currentColor, this.props.theme);
|
|
743
|
-
const anim = (t) => {
|
|
744
|
-
const focusTimeDeltaMs = Number.isNaN(this.prevFocusTime) ? 0 : t - this.prevFocusTime;
|
|
745
|
-
this.prevFocusTime = t;
|
|
746
|
-
if (this.prevNodeTweenTime === Infinity)
|
|
747
|
-
this.prevNodeTweenTime = t;
|
|
748
|
-
const nodeTweenTime = (0, common_2.clamp)((t - this.prevNodeTweenTime) / NODE_TWEEN_DURATION_MS, 0, 1);
|
|
749
|
-
const nodeTweenInProgress = nodeTweenTime < 1;
|
|
750
|
-
const dx0 = this.targetFocus.x0 - this.currentFocus.x0;
|
|
751
|
-
const dx1 = this.targetFocus.x1 - this.currentFocus.x1;
|
|
752
|
-
const dy0 = this.targetFocus.y0 - this.currentFocus.y0;
|
|
753
|
-
const dy1 = this.targetFocus.y1 - this.currentFocus.y1;
|
|
754
|
-
const currentExtentX = this.currentFocus.x1 - this.currentFocus.x0;
|
|
755
|
-
const currentExtentY = this.currentFocus.y1 - this.currentFocus.y0;
|
|
756
|
-
const relativeExpansionX = Math.max(1, (currentExtentX + dx1 - dx0) / currentExtentX);
|
|
757
|
-
const relativeExpansionY = Math.max(1, (currentExtentX + dy1 - dy0) / currentExtentY);
|
|
758
|
-
const jointRelativeExpansion = (relativeExpansionX + relativeExpansionY) / 2;
|
|
759
|
-
const convergenceRateX = Math.min(1, focusTimeDeltaMs * RECURRENCE_ALPHA_PER_MS_X) / jointRelativeExpansion;
|
|
760
|
-
const convergenceRateY = Math.min(1, focusTimeDeltaMs * RECURRENCE_ALPHA_PER_MS_Y) / jointRelativeExpansion;
|
|
761
|
-
this.currentFocus.x0 += convergenceRateX * dx0;
|
|
762
|
-
this.currentFocus.x1 += convergenceRateX * dx1;
|
|
763
|
-
this.currentFocus.y0 += convergenceRateY * dy0;
|
|
764
|
-
this.currentFocus.y1 += convergenceRateY * dy1;
|
|
765
|
-
this.wobbleTimeLeft -= focusTimeDeltaMs;
|
|
766
|
-
const wobbleAnimationInProgress = this.wobbleTimeLeft > 0;
|
|
767
|
-
const timeFromWobbleStart = (0, common_2.clamp)(WOBBLE_DURATION - this.wobbleTimeLeft, 0, WOBBLE_DURATION);
|
|
768
|
-
renderFrame([this.currentFocus.x0, this.currentFocus.x1, this.currentFocus.y0, this.currentFocus.y1], this.wobbleIndex, wobbleAnimationInProgress ? 0.01 + 0.99 * (0.5 - 0.5 * Math.cos(timeFromWobbleStart * WOBBLE_FREQUENCY)) : 0, nodeTweenTime);
|
|
769
|
-
const maxDiff = Math.max(Math.abs(dx0), Math.abs(dx1), Math.abs(dy0), Math.abs(dy1));
|
|
770
|
-
const focusAnimationInProgress = maxDiff > 1e-12;
|
|
771
|
-
if (focusAnimationInProgress || wobbleAnimationInProgress || nodeTweenInProgress) {
|
|
772
|
-
this.animationRafId = window.requestAnimationFrame(anim);
|
|
773
|
-
}
|
|
774
|
-
else {
|
|
775
|
-
this.prevFocusTime = NaN;
|
|
776
|
-
this.currentFocus.x0 = this.targetFocus.x0;
|
|
777
|
-
this.currentFocus.x1 = this.targetFocus.x1;
|
|
778
|
-
this.currentFocus.y0 = this.targetFocus.y0;
|
|
779
|
-
this.currentFocus.y1 = this.targetFocus.y1;
|
|
780
|
-
}
|
|
781
|
-
};
|
|
782
|
-
window.cancelAnimationFrame(this.animationRafId);
|
|
783
|
-
this.animationRafId = window.requestAnimationFrame(anim);
|
|
784
|
-
this.props.onRenderChange(true);
|
|
785
|
-
};
|
|
786
|
-
this.getMinimapWidth = () => this.props.chartDimensions.width / MINIMAP_SIZE_RATIO_X;
|
|
787
|
-
this.getMinimapHeight = () => this.props.chartDimensions.height / MINIMAP_SIZE_RATIO_Y;
|
|
788
|
-
this.getMinimapLeft = () => this.props.chartDimensions.width - this.getMinimapWidth();
|
|
789
|
-
this.getMinimapTop = () => this.props.chartDimensions.height - this.getMinimapHeight();
|
|
790
|
-
this.ensurePickTexture = () => {
|
|
791
|
-
var _a;
|
|
792
|
-
const { width, height } = this.props.chartDimensions;
|
|
793
|
-
const pr = window.devicePixelRatio * this.pinchZoomScale;
|
|
794
|
-
const textureWidth = pr * width;
|
|
795
|
-
const textureHeight = pr * height;
|
|
796
|
-
const current = this.pickTexture;
|
|
797
|
-
if (this.glContext &&
|
|
798
|
-
(current === kingly_1.NullTexture || current.width !== textureWidth || current.height !== textureHeight)) {
|
|
799
|
-
current.delete();
|
|
800
|
-
this.pickTexture =
|
|
801
|
-
(_a = (0, kingly_1.createTexture)(this.glContext, {
|
|
802
|
-
textureIndex: 0,
|
|
803
|
-
width: textureWidth,
|
|
804
|
-
height: textureHeight,
|
|
805
|
-
internalFormat: webgl_constants_1.GL.RGBA8,
|
|
806
|
-
data: null,
|
|
807
|
-
})) !== null && _a !== void 0 ? _a : kingly_1.NullTexture;
|
|
808
|
-
(0, kingly_1.bindFramebuffer)(this.glContext, webgl_constants_1.GL.READ_FRAMEBUFFER, this.pickTexture.target());
|
|
809
|
-
}
|
|
810
|
-
};
|
|
811
|
-
this.initializeGL = (gl) => {
|
|
812
|
-
this.glResources = (0, ensure_webgl_1.ensureWebgl)(gl, Object.keys(this.props.columnarViewModel).filter(isAttributeKey));
|
|
813
|
-
(0, upload_to_webgl_1.uploadToWebgl)(gl, this.glResources.attributes, this.props.columnarViewModel);
|
|
814
|
-
};
|
|
815
|
-
this.restoreGL = (gl) => {
|
|
816
|
-
this.initializeGL(gl);
|
|
817
|
-
this.pickTexture = kingly_1.NullTexture;
|
|
818
|
-
this.uploadSearchColors();
|
|
819
|
-
this.ensureTextureAndDraw();
|
|
820
|
-
};
|
|
821
|
-
this.tryCanvasContext = () => {
|
|
822
|
-
const canvas = this.props.forwardStageRef.current;
|
|
823
|
-
const glCanvas = this.glCanvasRef.current;
|
|
824
|
-
this.ctx = canvas && canvas.getContext('2d');
|
|
825
|
-
this.glContext = glCanvas && glCanvas.getContext('webgl2');
|
|
826
|
-
this.ensurePickTexture();
|
|
827
|
-
if (glCanvas && this.glContext && this.glResources === types_1.NULL_GL_RESOURCES) {
|
|
828
|
-
glCanvas.addEventListener('webglcontextlost', this.contextLossHandler, false);
|
|
829
|
-
glCanvas.addEventListener('webglcontextrestored', this.contextRestoreHandler, false);
|
|
830
|
-
this.initializeGL(this.glContext);
|
|
831
|
-
}
|
|
832
|
-
};
|
|
833
|
-
this.contextLossHandler = (event) => {
|
|
834
|
-
window.cancelAnimationFrame(this.animationRafId);
|
|
835
|
-
event.preventDefault();
|
|
836
|
-
};
|
|
837
|
-
this.contextRestoreHandler = () => {
|
|
838
|
-
const glCanvas = this.glCanvasRef.current;
|
|
839
|
-
if (!glCanvas || !this.glContext)
|
|
840
|
-
return;
|
|
841
|
-
this.restoreGL(this.glContext);
|
|
842
|
-
const widthCss = glCanvas.style.width;
|
|
843
|
-
const widthNum = parseFloat(widthCss);
|
|
844
|
-
glCanvas.style.width = `${widthNum + 0.1}px`;
|
|
845
|
-
window.setTimeout(() => {
|
|
846
|
-
glCanvas.style.width = widthCss;
|
|
847
|
-
if (this.glContext)
|
|
848
|
-
this.restoreGL(this.glContext);
|
|
849
|
-
}, 0);
|
|
850
|
-
};
|
|
851
167
|
const columns = this.props.columnarViewModel;
|
|
852
168
|
const datumCount = columns.position1.length / 2;
|
|
853
169
|
if (datumCount % 1)
|
|
@@ -873,6 +189,24 @@ class FlameComponent extends react_1.default.Component {
|
|
|
873
189
|
this.prevNodeTweenTime =
|
|
874
190
|
columns.position0 === columns.position1 && columns.size0 === columns.size1 ? -Infinity : Infinity;
|
|
875
191
|
}
|
|
192
|
+
pinTooltip = (pinned) => {
|
|
193
|
+
if (!pinned) {
|
|
194
|
+
this.unpinTooltip(true);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
this.tooltipPinned = true;
|
|
198
|
+
this.tooltipSelectedSeries = this.tooltipValues;
|
|
199
|
+
};
|
|
200
|
+
toggleSelectedTooltipItem = (tooltipValue) => {
|
|
201
|
+
if (!this.tooltipPinned)
|
|
202
|
+
return;
|
|
203
|
+
this.tooltipSelectedSeries = this.tooltipSelectedSeries.length === 0 ? [tooltipValue] : [];
|
|
204
|
+
this.setState({});
|
|
205
|
+
};
|
|
206
|
+
setSelectedTooltipItems = (tooltipValues) => {
|
|
207
|
+
this.tooltipSelectedSeries = tooltipValues;
|
|
208
|
+
this.setState({});
|
|
209
|
+
};
|
|
876
210
|
focusOnNavElement(element) {
|
|
877
211
|
if (!element) {
|
|
878
212
|
return;
|
|
@@ -928,13 +262,65 @@ class FlameComponent extends react_1.default.Component {
|
|
|
928
262
|
getFocusOnRoot() {
|
|
929
263
|
return focusRect(this.props.columnarViewModel, this.props.chartDimensions.height, 0);
|
|
930
264
|
}
|
|
265
|
+
setupDevicePixelRatioChangeListener = () => {
|
|
266
|
+
window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`).addEventListener('change', () => {
|
|
267
|
+
this.setState({});
|
|
268
|
+
this.setupDevicePixelRatioChangeListener();
|
|
269
|
+
}, { once: true });
|
|
270
|
+
};
|
|
271
|
+
setupViewportScaleChangeListener = () => {
|
|
272
|
+
try {
|
|
273
|
+
if (browserRootWindow().visualViewport) {
|
|
274
|
+
window.clearInterval(this.pinchZoomSetInterval);
|
|
275
|
+
this.pinchZoomSetInterval = window.setInterval(() => {
|
|
276
|
+
const pinchZoomScale = browserRootWindow().visualViewport?.scale ?? 1;
|
|
277
|
+
if (pinchZoomScale !== this.pinchZoomScale) {
|
|
278
|
+
this.pinchZoomScale = pinchZoomScale;
|
|
279
|
+
this.setState({});
|
|
280
|
+
}
|
|
281
|
+
}, PINCH_ZOOM_CHECK_INTERVAL_MS);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
catch {
|
|
285
|
+
}
|
|
286
|
+
};
|
|
287
|
+
componentDidMount = () => {
|
|
288
|
+
this.tryCanvasContext();
|
|
289
|
+
if (this.props.search.text.length > 0 && this.searchInputRef.current) {
|
|
290
|
+
this.searchInputRef.current.value = this.props.search.text;
|
|
291
|
+
this.searchForText(false);
|
|
292
|
+
}
|
|
293
|
+
this.drawCanvas();
|
|
294
|
+
this.props.onChartRendered();
|
|
295
|
+
this.setupDevicePixelRatioChangeListener();
|
|
296
|
+
this.props.containerRef().current?.addEventListener('wheel', this.preventScroll, { passive: false });
|
|
297
|
+
};
|
|
931
298
|
componentWillUnmount() {
|
|
932
|
-
|
|
933
|
-
(_a = this.props.containerRef().current) === null || _a === void 0 ? void 0 : _a.removeEventListener('wheel', this.preventScroll);
|
|
299
|
+
this.props.containerRef().current?.removeEventListener('wheel', this.preventScroll);
|
|
934
300
|
}
|
|
301
|
+
ensureTextureAndDraw = () => {
|
|
302
|
+
this.ensurePickTexture();
|
|
303
|
+
this.drawCanvas();
|
|
304
|
+
};
|
|
935
305
|
chartDimensionsChanged({ height, width }) {
|
|
936
306
|
return this.props.chartDimensions.height !== height || this.props.chartDimensions.width !== width;
|
|
937
307
|
}
|
|
308
|
+
componentDidUpdate = ({ chartDimensions, search }) => {
|
|
309
|
+
if (!this.ctx)
|
|
310
|
+
this.tryCanvasContext();
|
|
311
|
+
if (this.tooltipPinned && this.chartDimensionsChanged(chartDimensions)) {
|
|
312
|
+
this.unpinTooltip();
|
|
313
|
+
}
|
|
314
|
+
this.bindControls();
|
|
315
|
+
if (search.text !== this.props.search.text && this.searchInputRef.current) {
|
|
316
|
+
this.searchInputRef.current.value = this.props.search.text;
|
|
317
|
+
this.searchForText(false);
|
|
318
|
+
}
|
|
319
|
+
this.ensureTextureAndDraw();
|
|
320
|
+
};
|
|
321
|
+
pointerInMinimap = (x, y) => x === (0, common_2.clamp)(x, this.getMinimapLeft(), this.getMinimapLeft() + this.getMinimapWidth()) &&
|
|
322
|
+
y === (0, common_2.clamp)(y, this.getMinimapTop(), this.getMinimapTop() + this.getMinimapHeight());
|
|
323
|
+
datumAtXY = (x, y) => this.glContext ? colorToDatumIndex((0, kingly_1.readPixel)(this.glContext, x, y)) : NaN;
|
|
938
324
|
updatePointerLocation(e) {
|
|
939
325
|
if (!this.props.forwardStageRef.current || !this.ctx)
|
|
940
326
|
return;
|
|
@@ -956,8 +342,25 @@ class FlameComponent extends react_1.default.Component {
|
|
|
956
342
|
this.smartDraw();
|
|
957
343
|
}
|
|
958
344
|
}
|
|
345
|
+
getHoveredDatumIndex = () => {
|
|
346
|
+
const pr = window.devicePixelRatio * this.pinchZoomScale;
|
|
347
|
+
const x = this.tooltipPinned ? this.pinnedPointerX : this.pointerX;
|
|
348
|
+
const y = this.tooltipPinned ? this.pinnedPointerY : this.pointerY;
|
|
349
|
+
return this.datumAtXY(pr * x, pr * (this.props.chartDimensions.height - y));
|
|
350
|
+
};
|
|
351
|
+
getDragDistanceX = () => this.pointerX - this.startOfDragX;
|
|
352
|
+
getDragDistanceY = () => -(this.pointerY - this.startOfDragY);
|
|
353
|
+
isDragging = ({ buttons }) => buttons & LEFT_MOUSE_BUTTON;
|
|
354
|
+
handleMouseHoverMove = (e) => {
|
|
355
|
+
if (!this.isDragging(e)) {
|
|
356
|
+
e.stopPropagation();
|
|
357
|
+
this.updatePointerLocation(e);
|
|
358
|
+
if (!this.tooltipPinned) {
|
|
359
|
+
this.updateHoverIndex();
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
};
|
|
959
363
|
updateHoverIndex() {
|
|
960
|
-
var _a;
|
|
961
364
|
const hoveredDatumIndex = this.getHoveredDatumIndex();
|
|
962
365
|
const prevHoverIndex = this.hoverIndex >= 0 ? this.hoverIndex : NaN;
|
|
963
366
|
this.hoverIndex = hoveredDatumIndex;
|
|
@@ -976,7 +379,7 @@ class FlameComponent extends react_1.default.Component {
|
|
|
976
379
|
this.tooltipValues = !(0, common_2.isNil)(hoverValue)
|
|
977
380
|
? [
|
|
978
381
|
{
|
|
979
|
-
label:
|
|
382
|
+
label: columns.label[this.hoverIndex] ?? '',
|
|
980
383
|
color: getColor(columns.color, this.hoverIndex),
|
|
981
384
|
isHighlighted: false,
|
|
982
385
|
isVisible: true,
|
|
@@ -990,6 +393,311 @@ class FlameComponent extends react_1.default.Component {
|
|
|
990
393
|
}
|
|
991
394
|
this.setState({});
|
|
992
395
|
}
|
|
396
|
+
handleMouseDragMove = (e) => {
|
|
397
|
+
e.stopPropagation();
|
|
398
|
+
this.updatePointerLocation(e);
|
|
399
|
+
if (this.isDragging(e)) {
|
|
400
|
+
const dragInMinimap = this.pointerInMinimap(this.startOfDragX, this.startOfDragY);
|
|
401
|
+
const focusMoveDirection = dragInMinimap ? 1 : -1;
|
|
402
|
+
const { x0, x1, y0, y1 } = this.currentFocus;
|
|
403
|
+
const focusWidth = x1 - x0;
|
|
404
|
+
const focusHeight = y1 - y0;
|
|
405
|
+
if (Number.isNaN(this.startOfDragFocusLeft))
|
|
406
|
+
this.startOfDragFocusLeft = x0;
|
|
407
|
+
if (Number.isNaN(this.startOfDragFocusTop))
|
|
408
|
+
this.startOfDragFocusTop = y0;
|
|
409
|
+
const dragDistanceX = this.getDragDistanceX();
|
|
410
|
+
const dragDistanceY = this.getDragDistanceY();
|
|
411
|
+
const { width: chartWidth, height: chartHeight } = this.props.chartDimensions;
|
|
412
|
+
const focusChartWidth = chartWidth - draw_a_frame_1.PADDING_LEFT - draw_a_frame_1.PADDING_RIGHT;
|
|
413
|
+
const focusChartHeight = chartHeight - draw_a_frame_1.PADDING_TOP - draw_a_frame_1.PADDING_BOTTOM;
|
|
414
|
+
const dragSpeedX = (dragInMinimap ? MINIMAP_SIZE_RATIO_X / focusWidth : 1) / focusChartWidth;
|
|
415
|
+
const dragSpeedY = (dragInMinimap ? MINIMAP_SIZE_RATIO_Y / focusHeight : 1) / focusChartHeight;
|
|
416
|
+
const deltaIntentX = focusMoveDirection * dragDistanceX * dragSpeedX * focusWidth;
|
|
417
|
+
const deltaIntentY = focusMoveDirection * dragDistanceY * dragSpeedY * focusHeight;
|
|
418
|
+
const deltaCorrectionX = deltaIntentX > 0
|
|
419
|
+
? Math.min(0, 1 - (this.startOfDragFocusLeft + focusWidth + deltaIntentX))
|
|
420
|
+
: -Math.min(0, this.startOfDragFocusLeft + deltaIntentX);
|
|
421
|
+
const deltaCorrectionY = deltaIntentY > 0
|
|
422
|
+
? Math.min(0, 1 - (this.startOfDragFocusTop + focusHeight + deltaIntentY))
|
|
423
|
+
: -Math.min(0, this.startOfDragFocusTop + deltaIntentY);
|
|
424
|
+
const deltaX = deltaIntentX + deltaCorrectionX;
|
|
425
|
+
const deltaY = deltaIntentY + deltaCorrectionY;
|
|
426
|
+
const newX0 = (0, common_2.clamp)(this.startOfDragFocusLeft + deltaX, 0, 1);
|
|
427
|
+
const newX1 = (0, common_2.clamp)(this.startOfDragFocusLeft + focusWidth + deltaX, 0, 1);
|
|
428
|
+
const newY0 = (0, common_2.clamp)(this.startOfDragFocusTop + deltaY, 0, 1);
|
|
429
|
+
const newY1 = (0, common_2.clamp)(this.startOfDragFocusTop + focusHeight + deltaY, 0, 1);
|
|
430
|
+
const newFocus = { x0: newX0, x1: newX1, y0: newY0, y1: newY1 };
|
|
431
|
+
this.currentFocus = newFocus;
|
|
432
|
+
this.targetFocus = newFocus;
|
|
433
|
+
this.navigator.add({ ...newFocus, index: NaN });
|
|
434
|
+
this.smartDraw();
|
|
435
|
+
}
|
|
436
|
+
};
|
|
437
|
+
clearDrag = () => {
|
|
438
|
+
this.startOfDragX = NaN;
|
|
439
|
+
this.startOfDragY = NaN;
|
|
440
|
+
this.startOfDragFocusLeft = NaN;
|
|
441
|
+
this.startOfDragFocusTop = NaN;
|
|
442
|
+
};
|
|
443
|
+
resetDrag = () => {
|
|
444
|
+
this.startOfDragX = this.pointerX;
|
|
445
|
+
this.startOfDragY = this.pointerY;
|
|
446
|
+
};
|
|
447
|
+
handleMouseDown = (e) => {
|
|
448
|
+
e.stopPropagation();
|
|
449
|
+
if (e.button === constants_1.SECONDARY_BUTTON || e.ctrlKey)
|
|
450
|
+
return;
|
|
451
|
+
if (Number.isNaN(this.pointerX + this.pointerY))
|
|
452
|
+
return;
|
|
453
|
+
if (this.tooltipPinned)
|
|
454
|
+
return;
|
|
455
|
+
this.resetDrag();
|
|
456
|
+
window.addEventListener('mousemove', this.handleMouseDragMove, { passive: true });
|
|
457
|
+
window.addEventListener('mouseup', this.handleMouseUp, { passive: true });
|
|
458
|
+
};
|
|
459
|
+
handleContextMenu = (e) => {
|
|
460
|
+
e.stopPropagation();
|
|
461
|
+
e.preventDefault();
|
|
462
|
+
if (this.tooltipPinned) {
|
|
463
|
+
this.handleUnpinningTooltip();
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
if (!Number.isFinite(this.getHoveredDatumIndex())) {
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
469
|
+
window.addEventListener('keyup', this.handleKeyUp);
|
|
470
|
+
window.addEventListener('click', this.handleUnpinningTooltip);
|
|
471
|
+
window.addEventListener('visibilitychange', this.handleUnpinningTooltip);
|
|
472
|
+
this.pinTooltip(true);
|
|
473
|
+
this.setState({});
|
|
474
|
+
};
|
|
475
|
+
handleMouseUp = (e) => {
|
|
476
|
+
e.stopPropagation();
|
|
477
|
+
window.removeEventListener('mousemove', this.handleMouseDragMove);
|
|
478
|
+
window.removeEventListener('mouseup', this.handleMouseUp);
|
|
479
|
+
if (this.tooltipPinned) {
|
|
480
|
+
this.unpinTooltip();
|
|
481
|
+
this.clearDrag();
|
|
482
|
+
return;
|
|
483
|
+
}
|
|
484
|
+
this.updatePointerLocation(e);
|
|
485
|
+
const dragDistanceX = this.getDragDistanceX();
|
|
486
|
+
const dragDistanceY = this.getDragDistanceY();
|
|
487
|
+
if (!dragDistanceX && !dragDistanceY) {
|
|
488
|
+
const hoveredDatumIndex = this.getHoveredDatumIndex();
|
|
489
|
+
const isDoubleClick = e.detail > 1;
|
|
490
|
+
const hasClickedOnRectangle = Number.isFinite(hoveredDatumIndex);
|
|
491
|
+
const mustFocus = SINGLE_CLICK_EMPTY_FOCUS || isDoubleClick !== hasClickedOnRectangle;
|
|
492
|
+
const isContextClick = e.button === constants_1.SECONDARY_BUTTON || e.ctrlKey;
|
|
493
|
+
if (mustFocus && !isContextClick && !this.pointerInMinimap(this.pointerX, this.pointerY)) {
|
|
494
|
+
const rect = focusRect(this.props.columnarViewModel, this.props.chartDimensions.height, hoveredDatumIndex);
|
|
495
|
+
this.navigator.add({ ...rect, index: hoveredDatumIndex });
|
|
496
|
+
this.focusOnNode(hoveredDatumIndex);
|
|
497
|
+
this.props.onElementClick([{ vmIndex: hoveredDatumIndex }]);
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
this.clearDrag();
|
|
501
|
+
this.setState({});
|
|
502
|
+
};
|
|
503
|
+
handleUnpinningTooltip = () => {
|
|
504
|
+
window.removeEventListener('keyup', this.handleKeyUp);
|
|
505
|
+
window.removeEventListener('click', this.handleUnpinningTooltip);
|
|
506
|
+
window.removeEventListener('visibilitychange', this.handleUnpinningTooltip);
|
|
507
|
+
this.pinTooltip(false);
|
|
508
|
+
};
|
|
509
|
+
static watchedKeys = ['Escape'];
|
|
510
|
+
handleKeyUp = ({ key }) => {
|
|
511
|
+
if (!FlameComponent.watchedKeys.includes(key))
|
|
512
|
+
return;
|
|
513
|
+
window.removeEventListener('keyup', this.handleKeyUp);
|
|
514
|
+
this.unpinTooltip();
|
|
515
|
+
};
|
|
516
|
+
handleMouseLeave = (e) => {
|
|
517
|
+
e.stopPropagation();
|
|
518
|
+
if (!this.tooltipPinned) {
|
|
519
|
+
this.smartDraw();
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
preventScroll = (e) => e.metaKey === IS_META_REQUIRED_FOR_ZOOM && e.preventDefault();
|
|
523
|
+
handleWheel = (e) => {
|
|
524
|
+
if (e.metaKey !== IS_META_REQUIRED_FOR_ZOOM)
|
|
525
|
+
return;
|
|
526
|
+
this.unpinTooltip();
|
|
527
|
+
this.updatePointerLocation(e);
|
|
528
|
+
const { x0, x1, y0, y1 } = this.currentFocus;
|
|
529
|
+
const wheelDelta = -e.deltaY;
|
|
530
|
+
const delta = wheelDelta * ZOOM_SPEED;
|
|
531
|
+
const unitX = this.pointerX / this.props.chartDimensions.width;
|
|
532
|
+
const unitY = (this.props.chartDimensions.height - this.pointerY) / this.props.chartDimensions.height;
|
|
533
|
+
const zoomOut = delta <= 0;
|
|
534
|
+
const midX = Math.abs(x0) < draw_a_frame_1.EPSILON && (zoomOut || this.pointerX < ZOOM_FROM_EDGE_BAND_LEFT)
|
|
535
|
+
? 0
|
|
536
|
+
: Math.abs(x1 - 1) < draw_a_frame_1.EPSILON &&
|
|
537
|
+
(zoomOut || this.pointerX > this.props.chartDimensions.width - ZOOM_FROM_EDGE_BAND_RIGHT)
|
|
538
|
+
? 1
|
|
539
|
+
: (0, common_2.clamp)(x0 + unitX * Math.abs(x1 - x0), 0, 1);
|
|
540
|
+
const midY = Math.abs(y0) < draw_a_frame_1.EPSILON &&
|
|
541
|
+
(zoomOut || this.pointerY > this.props.chartDimensions.height - ZOOM_FROM_EDGE_BAND_BOTTOM)
|
|
542
|
+
? 0
|
|
543
|
+
: Math.abs(y1 - 1) < draw_a_frame_1.EPSILON && (zoomOut || this.pointerY < ZOOM_FROM_EDGE_BAND_TOP)
|
|
544
|
+
? 1
|
|
545
|
+
: (0, common_2.clamp)(y0 + unitY * Math.abs(y1 - y0), 0, 1);
|
|
546
|
+
const targetX0 = (0, common_2.clamp)(x0 - delta * (x0 - midX), 0, 1);
|
|
547
|
+
const targetX1 = (0, common_2.clamp)(x1 + delta * (midX - x1), 0, 1);
|
|
548
|
+
const targetY0 = (0, common_2.clamp)(y0 - delta * (y0 - midY), 0, 1);
|
|
549
|
+
const targetY1 = (0, common_2.clamp)(y1 + delta * (midY - y1), 0, 1);
|
|
550
|
+
const newX0 = Math.min(targetX0, midX);
|
|
551
|
+
const newX1 = Math.max(targetX1, midX);
|
|
552
|
+
const newY0 = Math.min(targetY0, midY);
|
|
553
|
+
const newY1 = Math.max(targetY1, midY);
|
|
554
|
+
const xZoom = (e.ctrlKey || !e.altKey) && newX1 - newX0 >= DEEPEST_ZOOM_RATIO;
|
|
555
|
+
const yZoom = (e.ctrlKey || e.altKey) && newY1 - newY0 >= unitRowPitch(this.props.columnarViewModel.position1);
|
|
556
|
+
if (xZoom || yZoom) {
|
|
557
|
+
const newFocus = {
|
|
558
|
+
x0: xZoom ? newX0 : x0,
|
|
559
|
+
x1: xZoom ? newX1 : x1,
|
|
560
|
+
y0: yZoom ? newY0 : y0,
|
|
561
|
+
y1: yZoom ? newY1 : y1,
|
|
562
|
+
};
|
|
563
|
+
this.navigator.add({ ...newFocus, index: NaN });
|
|
564
|
+
this.currentFocus = newFocus;
|
|
565
|
+
this.targetFocus = newFocus;
|
|
566
|
+
}
|
|
567
|
+
this.smartDraw();
|
|
568
|
+
};
|
|
569
|
+
focusOnAllMatches = () => {
|
|
570
|
+
this.currentSearchHitCount = 0;
|
|
571
|
+
const searchString = this.currentSearchString;
|
|
572
|
+
const customizedSearchString = this.caseSensitive ? searchString : searchString.toLowerCase();
|
|
573
|
+
const regex = this.useRegex && getRegExp(searchString);
|
|
574
|
+
const columns = this.props.columnarViewModel;
|
|
575
|
+
this.currentColor = new Float32Array(columns.color);
|
|
576
|
+
const labels = columns.label;
|
|
577
|
+
const size = columns.size1;
|
|
578
|
+
const position = columns.position1;
|
|
579
|
+
const rowHeight = unitRowPitch(position);
|
|
580
|
+
const datumCount = labels.length;
|
|
581
|
+
let x0 = Infinity;
|
|
582
|
+
let x1 = -Infinity;
|
|
583
|
+
let y0 = Infinity;
|
|
584
|
+
let y1 = -Infinity;
|
|
585
|
+
for (let i = 0; i < datumCount; i++) {
|
|
586
|
+
const label = this.caseSensitive ? labels[i] : labels[i]?.toLowerCase();
|
|
587
|
+
if (regex ? label?.match(regex) : label?.includes(customizedSearchString)) {
|
|
588
|
+
this.currentSearchHitCount++;
|
|
589
|
+
x0 = Math.min(x0, position[2 * i] ?? 0);
|
|
590
|
+
x1 = Math.max(x1, (position[2 * i] ?? 0) + (size[i] ?? 0));
|
|
591
|
+
y0 = Math.min(y0, position[2 * i + 1] ?? 0);
|
|
592
|
+
y1 = Math.max(y1, (position[2 * i + 1] ?? 0) + rowHeight);
|
|
593
|
+
}
|
|
594
|
+
else if (this.currentColor[4 * i + 3] !== undefined) {
|
|
595
|
+
this.currentColor[4 * i + 3] *= 0.25;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
if (Number.isFinite(x0) && searchString.length > 0) {
|
|
599
|
+
Object.assign(this.targetFocus, focusForArea(this.props.chartDimensions.height, { x0, x1, y0, y1 }));
|
|
600
|
+
}
|
|
601
|
+
};
|
|
602
|
+
uploadSearchColors = () => {
|
|
603
|
+
const colorSetter = this.glResources.attributes.get('color');
|
|
604
|
+
if (this.glContext && colorSetter && this.currentColor.length === this.props.columnarViewModel.color.length) {
|
|
605
|
+
(0, upload_to_webgl_1.uploadToWebgl)(this.glContext, new Map([['color', colorSetter]]), { color: this.currentColor });
|
|
606
|
+
}
|
|
607
|
+
};
|
|
608
|
+
searchForText = (force) => {
|
|
609
|
+
const input = this.searchInputRef.current;
|
|
610
|
+
const searchString = input?.value;
|
|
611
|
+
if (!input || typeof searchString !== 'string' || (searchString === this.currentSearchString && !force))
|
|
612
|
+
return;
|
|
613
|
+
this.currentSearchString = searchString;
|
|
614
|
+
this.focusOnAllMatches();
|
|
615
|
+
this.uploadSearchColors();
|
|
616
|
+
this.focusedMatchIndex = NaN;
|
|
617
|
+
this.setState({});
|
|
618
|
+
};
|
|
619
|
+
handleEnterKey = (e) => {
|
|
620
|
+
e.stopPropagation();
|
|
621
|
+
if (e.key === 'Enter') {
|
|
622
|
+
if (e.shiftKey) {
|
|
623
|
+
this.previousHit();
|
|
624
|
+
}
|
|
625
|
+
else {
|
|
626
|
+
this.nextHit();
|
|
627
|
+
}
|
|
628
|
+
return true;
|
|
629
|
+
}
|
|
630
|
+
return false;
|
|
631
|
+
};
|
|
632
|
+
clearSearchText = () => {
|
|
633
|
+
if (!this.searchInputRef.current)
|
|
634
|
+
return;
|
|
635
|
+
this.searchInputRef.current.value = '';
|
|
636
|
+
this.searchForText(false);
|
|
637
|
+
};
|
|
638
|
+
handleEscapeKey = (e) => {
|
|
639
|
+
if (e.key === 'Escape') {
|
|
640
|
+
this.clearSearchText();
|
|
641
|
+
}
|
|
642
|
+
};
|
|
643
|
+
handleSearchFieldKeyPress = (e) => {
|
|
644
|
+
if (this.handleEnterKey(e)) {
|
|
645
|
+
e.stopPropagation();
|
|
646
|
+
}
|
|
647
|
+
};
|
|
648
|
+
focusOnHit = () => {
|
|
649
|
+
if (Number.isNaN(this.focusedMatchIndex)) {
|
|
650
|
+
this.focusOnAllMatches();
|
|
651
|
+
}
|
|
652
|
+
else {
|
|
653
|
+
let datumIndex = NaN;
|
|
654
|
+
let hitEnumerator = -1;
|
|
655
|
+
const searchString = this.currentSearchString;
|
|
656
|
+
const customizedSearchString = this.caseSensitive ? searchString : searchString.toLowerCase();
|
|
657
|
+
const regex = this.useRegex && getRegExp(searchString);
|
|
658
|
+
const labels = this.props.columnarViewModel.label;
|
|
659
|
+
for (let i = 0; i < labels.length; i++) {
|
|
660
|
+
const label = this.caseSensitive ? labels[i] : labels[i]?.toLowerCase();
|
|
661
|
+
if (regex ? label?.match(regex) : label?.includes(customizedSearchString)) {
|
|
662
|
+
datumIndex = i;
|
|
663
|
+
hitEnumerator++;
|
|
664
|
+
if (hitEnumerator === this.focusedMatchIndex)
|
|
665
|
+
break;
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
if (hitEnumerator >= 0) {
|
|
669
|
+
this.targetFocus = focusRect(this.props.columnarViewModel, this.props.chartDimensions.height, datumIndex);
|
|
670
|
+
this.prevFocusTime = NaN;
|
|
671
|
+
this.hoverIndex = NaN;
|
|
672
|
+
this.wobbleTimeLeft = WOBBLE_DURATION;
|
|
673
|
+
this.wobbleIndex = datumIndex;
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
previousHit = () => {
|
|
678
|
+
const hitCount = this.currentSearchHitCount;
|
|
679
|
+
if (!this.currentSearchString || hitCount === 0)
|
|
680
|
+
return;
|
|
681
|
+
this.focusedMatchIndex = Number.isNaN(this.focusedMatchIndex)
|
|
682
|
+
? hitCount - 1
|
|
683
|
+
: this.focusedMatchIndex === 0
|
|
684
|
+
? NaN
|
|
685
|
+
: this.focusedMatchIndex - 1;
|
|
686
|
+
this.focusOnHit();
|
|
687
|
+
this.setState({});
|
|
688
|
+
};
|
|
689
|
+
nextHit = () => {
|
|
690
|
+
const hitCount = this.currentSearchHitCount;
|
|
691
|
+
if (!this.currentSearchString || hitCount === 0)
|
|
692
|
+
return;
|
|
693
|
+
this.focusedMatchIndex = this.focusedMatchIndex = Number.isNaN(this.focusedMatchIndex)
|
|
694
|
+
? 0
|
|
695
|
+
: this.focusedMatchIndex === hitCount - 1
|
|
696
|
+
? NaN
|
|
697
|
+
: this.focusedMatchIndex + 1;
|
|
698
|
+
this.focusOnHit();
|
|
699
|
+
this.setState({});
|
|
700
|
+
};
|
|
993
701
|
getActiveCursor() {
|
|
994
702
|
if (this.tooltipPinned)
|
|
995
703
|
return constants_1.DEFAULT_CSS_CURSOR;
|
|
@@ -999,6 +707,183 @@ class FlameComponent extends react_1.default.Component {
|
|
|
999
707
|
return 'pointer';
|
|
1000
708
|
return 'grab';
|
|
1001
709
|
}
|
|
710
|
+
render = () => {
|
|
711
|
+
const { forwardStageRef, chartDimensions: { width: requestedWidth, height: requestedHeight }, a11ySettings, debugHistory, theme, canPinTooltip, } = this.props;
|
|
712
|
+
const width = (0, common_1.roundUpSize)(requestedWidth);
|
|
713
|
+
const height = (0, common_1.roundUpSize)(requestedHeight);
|
|
714
|
+
const style = {
|
|
715
|
+
width,
|
|
716
|
+
height,
|
|
717
|
+
top: 0,
|
|
718
|
+
left: 0,
|
|
719
|
+
padding: 0,
|
|
720
|
+
margin: 0,
|
|
721
|
+
border: 0,
|
|
722
|
+
position: 'absolute',
|
|
723
|
+
cursor: this.getActiveCursor(),
|
|
724
|
+
};
|
|
725
|
+
const dpr = window.devicePixelRatio * this.pinchZoomScale;
|
|
726
|
+
const canvasWidth = width * dpr;
|
|
727
|
+
const canvasHeight = height * dpr;
|
|
728
|
+
const hitCount = this.currentSearchHitCount;
|
|
729
|
+
const { textColor, buttonDisabledTextColor, buttonBackgroundColor, buttonDisabledBackgroundColor, buttonTextColor, } = theme.navigation;
|
|
730
|
+
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
731
|
+
react_1.default.createElement("figure", { "aria-labelledby": a11ySettings.labelId, "aria-describedby": a11ySettings.descriptionId },
|
|
732
|
+
react_1.default.createElement("canvas", { ref: this.glCanvasRef, className: "echCanvasRenderer", width: canvasWidth, height: canvasHeight, style: style, role: "presentation" }),
|
|
733
|
+
react_1.default.createElement("canvas", { ref: forwardStageRef, tabIndex: 0, className: "echCanvasRenderer", width: canvasWidth, height: canvasHeight, onMouseMove: this.handleMouseHoverMove, onMouseDown: this.handleMouseDown, onContextMenu: canPinTooltip ? this.handleContextMenu : undefined, onMouseLeave: this.handleMouseLeave, onKeyPress: this.handleEnterKey, onKeyUp: this.handleEscapeKey, onWheel: this.handleWheel, style: { ...style, outline: 'none' }, role: "presentation" })),
|
|
734
|
+
react_1.default.createElement("div", { style: {
|
|
735
|
+
position: 'absolute',
|
|
736
|
+
transform: `translateY(${this.props.chartDimensions.height - draw_a_frame_1.PADDING_BOTTOM + 4}px)`,
|
|
737
|
+
} },
|
|
738
|
+
react_1.default.createElement("label", { title: "Navigate back", style: {
|
|
739
|
+
color: this.navigator.canNavBackward() ? buttonTextColor : buttonDisabledTextColor,
|
|
740
|
+
fontWeight: 500,
|
|
741
|
+
marginLeft: 16,
|
|
742
|
+
marginRight: 4,
|
|
743
|
+
borderRadius: 4,
|
|
744
|
+
paddingInline: 4,
|
|
745
|
+
width: 18,
|
|
746
|
+
display: 'inline-block',
|
|
747
|
+
height: 16,
|
|
748
|
+
verticalAlign: 'middle',
|
|
749
|
+
textAlign: 'center',
|
|
750
|
+
backgroundColor: this.navigator.canNavBackward() ? buttonBackgroundColor : buttonDisabledBackgroundColor,
|
|
751
|
+
} },
|
|
752
|
+
"\u1438",
|
|
753
|
+
react_1.default.createElement("input", { type: "button", tabIndex: 0, onClick: () => this.focusOnNavElement(this.navigator.navBackward()), style: { display: 'none' } })),
|
|
754
|
+
react_1.default.createElement("label", { title: "Reset", style: {
|
|
755
|
+
color: buttonTextColor,
|
|
756
|
+
fontWeight: 500,
|
|
757
|
+
paddingInline: 4,
|
|
758
|
+
borderRadius: 4,
|
|
759
|
+
verticalAlign: 'middle',
|
|
760
|
+
backgroundColor: buttonBackgroundColor,
|
|
761
|
+
} },
|
|
762
|
+
"\u25B2",
|
|
763
|
+
react_1.default.createElement("input", { type: "button", tabIndex: 0, onClick: () => this.resetFocus(), style: { display: 'none' } })),
|
|
764
|
+
react_1.default.createElement("label", { title: "Navigate forward", style: {
|
|
765
|
+
color: this.navigator.canNavForward() ? buttonTextColor : buttonDisabledTextColor,
|
|
766
|
+
fontWeight: 500,
|
|
767
|
+
marginLeft: 4,
|
|
768
|
+
marginRight: 16,
|
|
769
|
+
borderRadius: 4,
|
|
770
|
+
paddingInline: 4,
|
|
771
|
+
verticalAlign: 'middle',
|
|
772
|
+
backgroundColor: this.navigator.canNavForward() ? buttonBackgroundColor : buttonDisabledBackgroundColor,
|
|
773
|
+
} },
|
|
774
|
+
"\u1433",
|
|
775
|
+
react_1.default.createElement("input", { type: "button", tabIndex: 0, onClick: () => this.focusOnNavElement(this.navigator.navForward()), style: { display: 'none' } })),
|
|
776
|
+
react_1.default.createElement("input", { ref: this.searchInputRef, title: "Search string or regex pattern", size: 16, type: "text", tabIndex: 0, placeholder: "Search string", onKeyPress: this.handleSearchFieldKeyPress, onKeyUp: this.handleEscapeKey, onChange: (e) => {
|
|
777
|
+
this.searchForText(false);
|
|
778
|
+
this.props.onSeachTextChange(e.currentTarget.value);
|
|
779
|
+
}, style: {
|
|
780
|
+
border: 'none',
|
|
781
|
+
padding: 3,
|
|
782
|
+
outline: 'none',
|
|
783
|
+
color: textColor,
|
|
784
|
+
background: 'transparent',
|
|
785
|
+
} }),
|
|
786
|
+
react_1.default.createElement("label", { title: "Clear text", style: {
|
|
787
|
+
color: buttonTextColor,
|
|
788
|
+
background: buttonBackgroundColor,
|
|
789
|
+
fontWeight: 500,
|
|
790
|
+
paddingInline: 4,
|
|
791
|
+
marginInline: 4,
|
|
792
|
+
borderRadius: 4,
|
|
793
|
+
opacity: this.currentSearchString ? 1 : 0,
|
|
794
|
+
transition: 'opacity 250ms ease-in-out',
|
|
795
|
+
} },
|
|
796
|
+
"Clear",
|
|
797
|
+
react_1.default.createElement("input", { type: "button", tabIndex: 0, onClick: () => {
|
|
798
|
+
if (this.currentSearchString && this.searchInputRef.current) {
|
|
799
|
+
this.clearSearchText();
|
|
800
|
+
this.props.onSeachTextChange('');
|
|
801
|
+
}
|
|
802
|
+
}, style: { display: 'none' } })),
|
|
803
|
+
react_1.default.createElement("label", { title: "Case sensitivity (highlighted: case sensitive)", style: {
|
|
804
|
+
backgroundColor: this.caseSensitive && !this.useRegex ? buttonBackgroundColor : buttonDisabledBackgroundColor,
|
|
805
|
+
color: this.caseSensitive && !this.useRegex ? buttonTextColor : buttonDisabledTextColor,
|
|
806
|
+
fontWeight: 500,
|
|
807
|
+
paddingInline: 4,
|
|
808
|
+
marginInline: 4,
|
|
809
|
+
borderRadius: 4,
|
|
810
|
+
opacity: this.currentSearchString ? 1 : 0,
|
|
811
|
+
transition: 'opacity 250ms ease-in-out',
|
|
812
|
+
} },
|
|
813
|
+
"Cc",
|
|
814
|
+
react_1.default.createElement("input", { type: "button", tabIndex: 0, onClick: () => {
|
|
815
|
+
if (!this.currentSearchString)
|
|
816
|
+
return;
|
|
817
|
+
this.caseSensitive = !this.caseSensitive;
|
|
818
|
+
this.searchForText(true);
|
|
819
|
+
}, style: { display: 'none' } })),
|
|
820
|
+
react_1.default.createElement("label", { title: "Regex matching (highlighted: use regex)", style: {
|
|
821
|
+
color: this.useRegex ? buttonTextColor : buttonDisabledTextColor,
|
|
822
|
+
backgroundColor: this.useRegex ? buttonBackgroundColor : buttonDisabledBackgroundColor,
|
|
823
|
+
fontWeight: 500,
|
|
824
|
+
paddingInline: 4,
|
|
825
|
+
marginInline: 4,
|
|
826
|
+
borderRadius: 4,
|
|
827
|
+
opacity: this.currentSearchString ? 1 : 0,
|
|
828
|
+
transition: 'opacity 250ms ease-in-out',
|
|
829
|
+
} },
|
|
830
|
+
". *",
|
|
831
|
+
react_1.default.createElement("input", { type: "button", tabIndex: 0, onClick: () => {
|
|
832
|
+
if (!this.currentSearchString)
|
|
833
|
+
return;
|
|
834
|
+
this.useRegex = !this.useRegex;
|
|
835
|
+
this.searchForText(true);
|
|
836
|
+
}, style: { display: 'none' } })),
|
|
837
|
+
react_1.default.createElement("label", { title: "Previous hit", style: {
|
|
838
|
+
backgroundColor: hitCount ? buttonBackgroundColor : buttonDisabledBackgroundColor,
|
|
839
|
+
color: hitCount ? buttonTextColor : buttonDisabledTextColor,
|
|
840
|
+
fontWeight: 500,
|
|
841
|
+
marginLeft: 16,
|
|
842
|
+
marginRight: 4,
|
|
843
|
+
paddingInline: 4,
|
|
844
|
+
borderRadius: 4,
|
|
845
|
+
opacity: this.currentSearchString ? 1 : 0,
|
|
846
|
+
transition: 'opacity 250ms ease-in-out',
|
|
847
|
+
verticalAlign: 'middle',
|
|
848
|
+
} },
|
|
849
|
+
"\u25C0",
|
|
850
|
+
react_1.default.createElement("input", { type: "button", tabIndex: 0, onClick: this.previousHit, style: { display: 'none' } })),
|
|
851
|
+
react_1.default.createElement("label", { title: "Next hit", style: {
|
|
852
|
+
backgroundColor: hitCount ? buttonBackgroundColor : buttonDisabledBackgroundColor,
|
|
853
|
+
color: hitCount ? buttonTextColor : buttonDisabledTextColor,
|
|
854
|
+
fontWeight: 500,
|
|
855
|
+
paddingInline: 4,
|
|
856
|
+
borderRadius: 4,
|
|
857
|
+
opacity: this.currentSearchString ? 1 : 0,
|
|
858
|
+
transition: 'opacity 250ms ease-in-out',
|
|
859
|
+
verticalAlign: 'middle',
|
|
860
|
+
} },
|
|
861
|
+
"\u25B6",
|
|
862
|
+
react_1.default.createElement("input", { type: "button", tabIndex: 0, onClick: this.nextHit, style: { display: 'none' } })),
|
|
863
|
+
react_1.default.createElement("p", { style: {
|
|
864
|
+
float: 'right',
|
|
865
|
+
padding: 3,
|
|
866
|
+
opacity: this.currentSearchString ? 1 : 0,
|
|
867
|
+
transition: 'opacity 250ms ease-in-out',
|
|
868
|
+
color: textColor,
|
|
869
|
+
} }, `Match${Number.isNaN(this.focusedMatchIndex) ? 'es:' : `: ${this.focusedMatchIndex + 1} /`} ${hitCount}`)),
|
|
870
|
+
react_1.default.createElement(tooltip_1.BasicTooltip, { canPinTooltip: canPinTooltip, onPointerMove: () => (0, mouse_1.onPointerMove)({ position: { x: NaN, y: NaN }, time: NaN }), position: this.tooltipPinned
|
|
871
|
+
? { x: this.pinnedPointerX, y: this.pinnedPointerY, width: 0, height: 0 }
|
|
872
|
+
: { x: this.pointerX, y: this.pointerY, width: 0, height: 0 }, pinned: this.tooltipPinned, selected: this.tooltipSelectedSeries, pinTooltip: this.pinTooltip, toggleSelectedTooltipItem: this.toggleSelectedTooltipItem, setSelectedTooltipItems: this.setSelectedTooltipItems, visible: this.tooltipPinned || (this.props.tooltipRequired && this.hoverIndex >= 0 && !(this.wobbleTimeLeft > 0)), info: {
|
|
873
|
+
header: null,
|
|
874
|
+
values: this.tooltipValues,
|
|
875
|
+
}, getChartContainerRef: this.props.containerRef }),
|
|
876
|
+
debugHistory && (react_1.default.createElement("div", { style: {
|
|
877
|
+
position: 'absolute',
|
|
878
|
+
transform: `translate(20px, 20px)`,
|
|
879
|
+
background: 'beige',
|
|
880
|
+
opacity: 0.8,
|
|
881
|
+
} },
|
|
882
|
+
"history:",
|
|
883
|
+
react_1.default.createElement("ul", null, this.navigator.queue().map((d, i) => {
|
|
884
|
+
return (react_1.default.createElement("li", { key: `${d.index}-${i}` }, `${Number.isNaN(d.index) ? 'ZOOM/PAN' : d.index}${this.navigator.index() === i ? '⬅' : ''}`));
|
|
885
|
+
}))))));
|
|
886
|
+
};
|
|
1002
887
|
smartDraw() {
|
|
1003
888
|
if (Number.isFinite(this.hoverIndex)) {
|
|
1004
889
|
this.hoverIndex = NaN;
|
|
@@ -1008,30 +893,138 @@ class FlameComponent extends react_1.default.Component {
|
|
|
1008
893
|
this.drawCanvas();
|
|
1009
894
|
}
|
|
1010
895
|
}
|
|
896
|
+
drawCanvas = () => {
|
|
897
|
+
if (!this.ctx || !this.glContext || !this.pickTexture)
|
|
898
|
+
return;
|
|
899
|
+
const renderFrame = (0, draw_a_frame_1.drawFrame)(this.ctx, this.glContext, this.props.chartDimensions.width, this.props.chartDimensions.height, this.getMinimapWidth(), this.getMinimapHeight(), this.getMinimapLeft(), this.getMinimapTop(), window.devicePixelRatio * this.pinchZoomScale, this.props.columnarViewModel, this.pickTexture, this.glResources.pickTextureRenderer, this.glResources.roundedRectRenderer, this.hoverIndex, unitRowPitch(this.props.columnarViewModel.position1), this.currentColor, this.props.theme);
|
|
900
|
+
const anim = (t) => {
|
|
901
|
+
const focusTimeDeltaMs = Number.isNaN(this.prevFocusTime) ? 0 : t - this.prevFocusTime;
|
|
902
|
+
this.prevFocusTime = t;
|
|
903
|
+
if (this.prevNodeTweenTime === Infinity)
|
|
904
|
+
this.prevNodeTweenTime = t;
|
|
905
|
+
const nodeTweenTime = (0, common_2.clamp)((t - this.prevNodeTweenTime) / NODE_TWEEN_DURATION_MS, 0, 1);
|
|
906
|
+
const nodeTweenInProgress = nodeTweenTime < 1;
|
|
907
|
+
const dx0 = this.targetFocus.x0 - this.currentFocus.x0;
|
|
908
|
+
const dx1 = this.targetFocus.x1 - this.currentFocus.x1;
|
|
909
|
+
const dy0 = this.targetFocus.y0 - this.currentFocus.y0;
|
|
910
|
+
const dy1 = this.targetFocus.y1 - this.currentFocus.y1;
|
|
911
|
+
const currentExtentX = this.currentFocus.x1 - this.currentFocus.x0;
|
|
912
|
+
const currentExtentY = this.currentFocus.y1 - this.currentFocus.y0;
|
|
913
|
+
const relativeExpansionX = Math.max(1, (currentExtentX + dx1 - dx0) / currentExtentX);
|
|
914
|
+
const relativeExpansionY = Math.max(1, (currentExtentX + dy1 - dy0) / currentExtentY);
|
|
915
|
+
const jointRelativeExpansion = (relativeExpansionX + relativeExpansionY) / 2;
|
|
916
|
+
const convergenceRateX = Math.min(1, focusTimeDeltaMs * RECURRENCE_ALPHA_PER_MS_X) / jointRelativeExpansion;
|
|
917
|
+
const convergenceRateY = Math.min(1, focusTimeDeltaMs * RECURRENCE_ALPHA_PER_MS_Y) / jointRelativeExpansion;
|
|
918
|
+
this.currentFocus.x0 += convergenceRateX * dx0;
|
|
919
|
+
this.currentFocus.x1 += convergenceRateX * dx1;
|
|
920
|
+
this.currentFocus.y0 += convergenceRateY * dy0;
|
|
921
|
+
this.currentFocus.y1 += convergenceRateY * dy1;
|
|
922
|
+
this.wobbleTimeLeft -= focusTimeDeltaMs;
|
|
923
|
+
const wobbleAnimationInProgress = this.wobbleTimeLeft > 0;
|
|
924
|
+
const timeFromWobbleStart = (0, common_2.clamp)(WOBBLE_DURATION - this.wobbleTimeLeft, 0, WOBBLE_DURATION);
|
|
925
|
+
renderFrame([this.currentFocus.x0, this.currentFocus.x1, this.currentFocus.y0, this.currentFocus.y1], this.wobbleIndex, wobbleAnimationInProgress ? 0.01 + 0.99 * (0.5 - 0.5 * Math.cos(timeFromWobbleStart * WOBBLE_FREQUENCY)) : 0, nodeTweenTime);
|
|
926
|
+
const maxDiff = Math.max(Math.abs(dx0), Math.abs(dx1), Math.abs(dy0), Math.abs(dy1));
|
|
927
|
+
const focusAnimationInProgress = maxDiff > 1e-12;
|
|
928
|
+
if (focusAnimationInProgress || wobbleAnimationInProgress || nodeTweenInProgress) {
|
|
929
|
+
this.animationRafId = window.requestAnimationFrame(anim);
|
|
930
|
+
}
|
|
931
|
+
else {
|
|
932
|
+
this.prevFocusTime = NaN;
|
|
933
|
+
this.currentFocus.x0 = this.targetFocus.x0;
|
|
934
|
+
this.currentFocus.x1 = this.targetFocus.x1;
|
|
935
|
+
this.currentFocus.y0 = this.targetFocus.y0;
|
|
936
|
+
this.currentFocus.y1 = this.targetFocus.y1;
|
|
937
|
+
}
|
|
938
|
+
};
|
|
939
|
+
window.cancelAnimationFrame(this.animationRafId);
|
|
940
|
+
this.animationRafId = window.requestAnimationFrame(anim);
|
|
941
|
+
this.props.onRenderChange(true);
|
|
942
|
+
};
|
|
943
|
+
getMinimapWidth = () => this.props.chartDimensions.width / MINIMAP_SIZE_RATIO_X;
|
|
944
|
+
getMinimapHeight = () => this.props.chartDimensions.height / MINIMAP_SIZE_RATIO_Y;
|
|
945
|
+
getMinimapLeft = () => this.props.chartDimensions.width - this.getMinimapWidth();
|
|
946
|
+
getMinimapTop = () => this.props.chartDimensions.height - this.getMinimapHeight();
|
|
947
|
+
ensurePickTexture = () => {
|
|
948
|
+
const { width, height } = this.props.chartDimensions;
|
|
949
|
+
const pr = window.devicePixelRatio * this.pinchZoomScale;
|
|
950
|
+
const textureWidth = pr * width;
|
|
951
|
+
const textureHeight = pr * height;
|
|
952
|
+
const current = this.pickTexture;
|
|
953
|
+
if (this.glContext &&
|
|
954
|
+
(current === kingly_1.NullTexture || current.width !== textureWidth || current.height !== textureHeight)) {
|
|
955
|
+
current.delete();
|
|
956
|
+
this.pickTexture =
|
|
957
|
+
(0, kingly_1.createTexture)(this.glContext, {
|
|
958
|
+
textureIndex: 0,
|
|
959
|
+
width: textureWidth,
|
|
960
|
+
height: textureHeight,
|
|
961
|
+
internalFormat: webgl_constants_1.GL.RGBA8,
|
|
962
|
+
data: null,
|
|
963
|
+
}) ?? kingly_1.NullTexture;
|
|
964
|
+
(0, kingly_1.bindFramebuffer)(this.glContext, webgl_constants_1.GL.READ_FRAMEBUFFER, this.pickTexture.target());
|
|
965
|
+
}
|
|
966
|
+
};
|
|
967
|
+
initializeGL = (gl) => {
|
|
968
|
+
this.glResources = (0, ensure_webgl_1.ensureWebgl)(gl, Object.keys(this.props.columnarViewModel).filter(isAttributeKey));
|
|
969
|
+
(0, upload_to_webgl_1.uploadToWebgl)(gl, this.glResources.attributes, this.props.columnarViewModel);
|
|
970
|
+
};
|
|
971
|
+
restoreGL = (gl) => {
|
|
972
|
+
this.initializeGL(gl);
|
|
973
|
+
this.pickTexture = kingly_1.NullTexture;
|
|
974
|
+
this.uploadSearchColors();
|
|
975
|
+
this.ensureTextureAndDraw();
|
|
976
|
+
};
|
|
977
|
+
tryCanvasContext = () => {
|
|
978
|
+
const canvas = this.props.forwardStageRef.current;
|
|
979
|
+
const glCanvas = this.glCanvasRef.current;
|
|
980
|
+
this.ctx = canvas && canvas.getContext('2d');
|
|
981
|
+
this.glContext = glCanvas && glCanvas.getContext('webgl2');
|
|
982
|
+
this.ensurePickTexture();
|
|
983
|
+
if (glCanvas && this.glContext && this.glResources === types_1.NULL_GL_RESOURCES) {
|
|
984
|
+
glCanvas.addEventListener('webglcontextlost', this.contextLossHandler, false);
|
|
985
|
+
glCanvas.addEventListener('webglcontextrestored', this.contextRestoreHandler, false);
|
|
986
|
+
this.initializeGL(this.glContext);
|
|
987
|
+
}
|
|
988
|
+
};
|
|
989
|
+
contextLossHandler = (event) => {
|
|
990
|
+
window.cancelAnimationFrame(this.animationRafId);
|
|
991
|
+
event.preventDefault();
|
|
992
|
+
};
|
|
993
|
+
contextRestoreHandler = () => {
|
|
994
|
+
const glCanvas = this.glCanvasRef.current;
|
|
995
|
+
if (!glCanvas || !this.glContext)
|
|
996
|
+
return;
|
|
997
|
+
this.restoreGL(this.glContext);
|
|
998
|
+
const widthCss = glCanvas.style.width;
|
|
999
|
+
const widthNum = parseFloat(widthCss);
|
|
1000
|
+
glCanvas.style.width = `${widthNum + 0.1}px`;
|
|
1001
|
+
window.setTimeout(() => {
|
|
1002
|
+
glCanvas.style.width = widthCss;
|
|
1003
|
+
if (this.glContext)
|
|
1004
|
+
this.restoreGL(this.glContext);
|
|
1005
|
+
}, 0);
|
|
1006
|
+
};
|
|
1011
1007
|
}
|
|
1012
|
-
FlameComponent.displayName = 'Flame';
|
|
1013
|
-
FlameComponent.watchedKeys = ['Escape'];
|
|
1014
1008
|
const mapStateToProps = (state) => {
|
|
1015
|
-
|
|
1016
|
-
const flameSpec = (0, utils_1.getSpecsFromStore)(state.specs, __1.ChartType.Flame, specs_1.SpecType.Series)[0];
|
|
1009
|
+
const flameSpec = (0, get_specs_from_store_1.getSpecsFromStore)(state.specs, __1.ChartType.Flame, spec_type_1.SpecType.Series)[0];
|
|
1017
1010
|
const settingsSpec = (0, get_settings_spec_1.getSettingsSpecSelector)(state);
|
|
1018
1011
|
const tooltipSpec = (0, get_tooltip_spec_1.getTooltipSpecSelector)(state);
|
|
1019
1012
|
return {
|
|
1020
1013
|
theme: (0, get_chart_theme_1.getChartThemeSelector)(state).flamegraph,
|
|
1021
1014
|
debugHistory: settingsSpec.debug,
|
|
1022
|
-
columnarViewModel:
|
|
1023
|
-
controlProviderCallback:
|
|
1024
|
-
animationDuration:
|
|
1015
|
+
columnarViewModel: flameSpec?.columnarData ?? types_1.nullColumnarViewModel,
|
|
1016
|
+
controlProviderCallback: flameSpec?.controlProviderCallback ?? {},
|
|
1017
|
+
animationDuration: flameSpec?.animation.duration ?? 0,
|
|
1025
1018
|
chartDimensions: state.parentDimensions,
|
|
1026
1019
|
a11ySettings: (0, get_accessibility_config_1.getA11ySettingsSelector)(state),
|
|
1027
1020
|
tooltipRequired: tooltipSpec.type !== specs_1.TooltipType.None,
|
|
1028
1021
|
canPinTooltip: (0, can_pin_tooltip_1.isPinnableTooltip)(state),
|
|
1029
|
-
search:
|
|
1030
|
-
onSeachTextChange:
|
|
1031
|
-
onElementOver:
|
|
1032
|
-
onElementClick:
|
|
1033
|
-
onElementOut:
|
|
1034
|
-
onRenderChange:
|
|
1022
|
+
search: flameSpec?.search ?? { text: '' },
|
|
1023
|
+
onSeachTextChange: flameSpec?.onSearchTextChange ?? (() => { }),
|
|
1024
|
+
onElementOver: settingsSpec.onElementOver ?? (() => { }),
|
|
1025
|
+
onElementClick: settingsSpec.onElementClick ?? (() => { }),
|
|
1026
|
+
onElementOut: settingsSpec.onElementOut ?? (() => { }),
|
|
1027
|
+
onRenderChange: settingsSpec.onRenderChange ?? (() => { }),
|
|
1035
1028
|
};
|
|
1036
1029
|
};
|
|
1037
1030
|
const mapDispatchToProps = (dispatch) => (0, redux_1.bindActionCreators)({
|