@datarailsshared/dr_renderer 1.2.342 → 1.2.343
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/package.json
CHANGED
@@ -143,6 +143,7 @@ const FEATURES = {
|
|
143
143
|
ENABLE_NEW_WIDGET_VALUE_FORMATTING: 'enable_new_widget_value_formatting',
|
144
144
|
ENABLE_SERVER_TOTALS_CALCULATION: 'enable_server_totals_calculation',
|
145
145
|
FORMAT_AXIS: 'use_default_table_format_for_axis',
|
146
|
+
DASHBOARD_INSIGHT_TOOLTIP_RELATIVE_POSITION: 'dashboard_insight_tooltip_relative_position',
|
146
147
|
}
|
147
148
|
|
148
149
|
const TICKS_COUNT = 5;
|
@@ -175,11 +176,13 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
175
176
|
|
176
177
|
highchartsRenderer.useTotalsCalculation = false;
|
177
178
|
highchartsRenderer.enabledNewWidgetValueFormatting = false;
|
179
|
+
highchartsRenderer.relativePositionForInsightTooltips = false;
|
178
180
|
let disableAnimation = false;
|
179
181
|
if (document.ReportHippo && document.ReportHippo && document.ReportHippo.user) {
|
180
182
|
highchartsRenderer.useTotalsCalculation = lodash.includes(document.ReportHippo.user.features, FEATURES.ENABLE_SERVER_TOTALS_CALCULATION);
|
181
183
|
disableAnimation = document.ReportHippo.user.organization && document.ReportHippo.user.organization.settings && document.ReportHippo.user.organization.settings.disable_animation
|
182
184
|
highchartsRenderer.enabledNewWidgetValueFormatting = lodash.includes(document.ReportHippo.user.features, FEATURES.ENABLE_NEW_WIDGET_VALUE_FORMATTING);
|
185
|
+
highchartsRenderer.relativePositionForInsightTooltips = lodash.includes(document.ReportHippo.user.features, FEATURES.DASHBOARD_INSIGHT_TOOLTIP_RELATIVE_POSITION);
|
183
186
|
}
|
184
187
|
|
185
188
|
// fix issue of use tootip.stickOnContact with tooltip.outside , source: https://github.com/highcharts/highcharts/pull/15960
|
@@ -683,7 +686,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
683
686
|
highchartsRenderer.customFormatterTooltipInsights = function(pivotData, opts) {
|
684
687
|
return {
|
685
688
|
useHTML: true,
|
686
|
-
outside:
|
689
|
+
outside: !highchartsRenderer.relativePositionForInsightTooltips,
|
687
690
|
backgroundColor: 'transparent',
|
688
691
|
borderWidth: 0,
|
689
692
|
borderRadius: 0,
|