Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove visualization:visualize:legacyHeatmapChartsLibrary from Advanced Setting #197995

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions docs/management/advanced-options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,6 @@ Enables the legacy time axis for charts in Lens, Discover, Visualize and TSVB
[[visualization-heatmap-maxbuckets]]`visualization:heatmap:maxBuckets`::
The maximum number of buckets a datasource can return. High numbers can have a negative impact on your browser rendering performance.

[[visualization-visualize-heatmapChartslibrary]]`visualization:visualize:legacyHeatmapChartsLibrary`::
Disable this option if you prefer to use the new heatmap charts with improved performance, legend settings, and more..

[float]
[[kibana-global-settings-reference]]
=== Change the global settings
Expand Down
2 changes: 0 additions & 2 deletions packages/kbn-management/settings/setting_ids/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,4 @@ export const VISUALIZATION_HEATMAP_MAX_BUCKETS_ID = 'visualization:heatmap:maxBu
export const VISUALIZATION_USE_LEGACY_TIME_AXIS_ID = 'visualization:useLegacyTimeAxis';
export const VISUALIZATION_LEGACY_GAUGE_CHARTS_LIBRARY_ID =
'visualization:visualize:legacyGaugeChartsLibrary';
export const VISUALIZATION_LEGACY_HEATMAP_CHARTS_LIBRARY_ID =
'visualization:visualize:legacyHeatmapChartsLibrary';
export const VISUALIZATION_ENABLE_LABS_ID = 'visualize:enableLabs';
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,6 @@ export const stackManagementSchema: MakeSchemaFrom<UsageStats> = {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
},
'visualization:visualize:legacyHeatmapChartsLibrary': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
},
'doc_table:legacy': {
type: 'boolean',
_meta: { description: 'Non-default value of setting.' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export interface UsageStats {
'autocomplete:useTimeRange': boolean;
'autocomplete:valueSuggestionMethod': string;
'search:timeout': number;
'visualization:visualize:legacyHeatmapChartsLibrary': boolean;
'doc_table:legacy': boolean;
'discover:modifyColumnsOnSwitch': boolean;
'discover:searchFieldsFromSource': boolean;
Expand Down
8 changes: 1 addition & 7 deletions src/plugins/telemetry/schema/oss_plugins.json
Original file line number Diff line number Diff line change
Expand Up @@ -10485,12 +10485,6 @@
"description": "Non-default value of setting."
}
},
"visualization:visualize:legacyHeatmapChartsLibrary": {
"type": "boolean",
"_meta": {
"description": "Non-default value of setting."
}
},
"doc_table:legacy": {
"type": "boolean",
"_meta": {
Expand Down Expand Up @@ -12343,4 +12337,4 @@
}
}
}
}
}
2 changes: 0 additions & 2 deletions src/plugins/vis_types/heatmap/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/

export const LEGACY_HEATMAP_CHARTS_LIBRARY = 'visualization:visualize:legacyHeatmapChartsLibrary';
22 changes: 9 additions & 13 deletions src/plugins/vis_types/heatmap/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import type { FieldFormatsStart } from '@kbn/field-formats-plugin/public';
import type { UsageCollectionSetup } from '@kbn/usage-collection-plugin/public';
import type { DataPublicPluginStart } from '@kbn/data-plugin/public';
import type { HeatmapPublicConfig } from '../server/config';
import { LEGACY_HEATMAP_CHARTS_LIBRARY } from '../common';
import { heatmapVisType } from './vis_type';
import { setDataViewsStart } from './services';

Expand Down Expand Up @@ -48,18 +47,15 @@ export class VisTypeHeatmapPlugin {
core: CoreSetup<VisTypeHeatmapPluginStartDependencies>,
{ visualizations, charts, usageCollection }: VisTypeHeatmapSetupDependencies
) {
if (!core.uiSettings.get(LEGACY_HEATMAP_CHARTS_LIBRARY)) {
const { readOnly } = this.initializerContext.config.get<HeatmapPublicConfig>();
visualizations.createBaseVisualization({
...heatmapVisType({
showElasticChartsOptions: true,
palettes: charts.palettes,
}),
disableCreate: Boolean(readOnly),
disableEdit: Boolean(readOnly),
});
}
return {};
const { readOnly } = this.initializerContext.config.get<HeatmapPublicConfig>();
visualizations.createBaseVisualization({
...heatmapVisType({
showElasticChartsOptions: true,
palettes: charts.palettes,
}),
disableCreate: Boolean(readOnly),
disableEdit: Boolean(readOnly),
});
}

start(core: CoreStart, { dataViews }: VisTypeHeatmapStartDependencies) {
Expand Down
41 changes: 1 addition & 40 deletions src/plugins/vis_types/heatmap/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,10 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import { i18n } from '@kbn/i18n';
import { schema } from '@kbn/config-schema';

import { CoreSetup, Plugin, PluginInitializerContext, UiSettingsParams } from '@kbn/core/server';
import { CoreSetup, Plugin, PluginInitializerContext } from '@kbn/core/server';
import type { VisualizationsServerSetup } from '@kbn/visualizations-plugin/server';
import { HeatmapConfig } from './config';

import { LEGACY_HEATMAP_CHARTS_LIBRARY } from '../common';

export const getUiSettingsConfig: () => Record<string, UiSettingsParams<boolean>> = () => ({
// TODO: Remove this when vislib heatmap is removed
[LEGACY_HEATMAP_CHARTS_LIBRARY]: {
name: i18n.translate(
'visTypeHeatmap.advancedSettings.visualization.legacyHeatmapChartsLibrary.name',
{
defaultMessage: 'Heatmap legacy charts library',
}
),
requiresPageReload: true,
value: false,
description: i18n.translate(
'visTypeHeatmap.advancedSettings.visualization.legacyHeatmapChartsLibrary.description',
{
defaultMessage: 'Enables legacy charts library for heatmap charts in visualize.',
}
),
deprecation: {
message: i18n.translate(
'visTypeHeatmap.advancedSettings.visualization.legacyHeatmapChartsLibrary.deprecation',
{
defaultMessage:
'The legacy charts library for heatmap in visualize is deprecated and will not be supported in a future version.',
}
),
docLinksKey: 'visualizationSettings',
},
category: ['visualization'],
schema: schema.boolean(),
},
});

interface PluginSetupDependencies {
visualizations: VisualizationsServerSetup;
}
Expand All @@ -58,8 +21,6 @@ export class VisTypeHeatmapServerPlugin implements Plugin<object, object> {
}

public setup(core: CoreSetup, plugins: PluginSetupDependencies) {
core.uiSettings.register(getUiSettingsConfig());

const { readOnly } = this.initializerContext.config.get<HeatmapConfig>();
if (readOnly) {
plugins.visualizations.registerReadOnlyVisType('heatmap');
Expand Down
1 change: 0 additions & 1 deletion src/plugins/vis_types/vislib/kibana.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
],
"requiredBundles": [
"kibanaUtils",
"visTypeHeatmap",
"visTypeGauge"
]
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

11 changes: 0 additions & 11 deletions src/plugins/vis_types/vislib/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ import type { DataPublicPluginStart } from '@kbn/data-plugin/public';
import type { FieldFormatsStart } from '@kbn/field-formats-plugin/public';
import type { UsageCollectionStart } from '@kbn/usage-collection-plugin/public';

import { LEGACY_HEATMAP_CHARTS_LIBRARY } from '@kbn/vis-type-heatmap-plugin/common';
import { LEGACY_GAUGE_CHARTS_LIBRARY } from '@kbn/vis-type-gauge-plugin/common';
import type { VislibPublicConfig } from '../server/config';
import { setAnalytics, setI18n, setUsageCollectionStart } from './services';
import { heatmapVisTypeDefinition } from './heatmap';

import { createVisTypeVislibVisFn } from './vis_type_vislib_vis_fn';
import { setFormatService, setDataActions, setTheme } from './services';
Expand Down Expand Up @@ -59,15 +57,6 @@ export class VisTypeVislibPlugin

const { readOnly } = this.initializerContext.config.get<VislibPublicConfig>();

if (core.uiSettings.get(LEGACY_HEATMAP_CHARTS_LIBRARY)) {
// register vislib heatmap chart
visualizations.createBaseVisualization({
...heatmapVisTypeDefinition,
disableCreate: Boolean(readOnly),
disableEdit: Boolean(readOnly),
});
}

if (core.uiSettings.get(LEGACY_GAUGE_CHARTS_LIBRARY)) {
// register vislib gauge and goal charts
visualizations.createBaseVisualization({
Expand Down
1 change: 0 additions & 1 deletion src/plugins/vis_types/vislib/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export const GaugeType = Object.freeze({
export type GaugeType = $Values<typeof GaugeType>;

export const VislibChartType = Object.freeze({
Heatmap: 'heatmap' as const,
Gauge: 'gauge' as const,
Goal: 'goal' as const,
Metric: 'metric' as const,
Expand Down
7 changes: 1 addition & 6 deletions src/plugins/vis_types/vislib/public/vislib/VISLIB.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Charts supported

Vislib supports the gauge/goal charts from the aggregation-based visualizations. It also contains the legacy implemementation of the heatmap chart (enabled by the visualization:visualize:legacyHeatmapChartsLibrary advanced setting).
Vislib supports the gauge/goal charts from the aggregation-based visualizations.

# General overview

Expand All @@ -16,9 +16,4 @@ Each base vis type (`lib/types`) can have a different layout defined (`lib/layou

All base visualizations extend from `visualizations/_chart`


### Map

### Point series chart

`visualizations/point_series` takes care of drawing the point series chart (no axes or titles, just the chart itself). It creates all the series defined and calls render method on them.
Loading