Repository navigation
Included commits: 1.7.1...2.0.0
Breaking Changes
- Replaced the Plotly based Back Office charts with ECharts. The
spryker-zed-chart-plotly-mainbundle was replaced withspryker-zed-chart-main, so the Zed frontend has to be rebuilt. - Removed the Back Office Twig chart plugins
AbstractTwigChartPlugin,ChartTwigPlugin,TwigBarChartPlugin,TwigChartPlugin,TwigLineChartPluginandTwigPieChartPlugin, together withTwigChartFunctionServiceProvider,ChartCommunicationFactoryand the@Chart/_template/*and@Chart/_partials/plotly-chart.twigtemplates. The Twig plugins ofspryker/chart-guihave to be used instead. - Removed the plugin stacks from
ChartDependencyProvider: thePLUGIN_CHARTSandPLUGIN_TWIG_CHART_FUNCTIONSconstants and theprovideCommunicationLayerDependencies(),addChartPlugins(),getChartPlugins(),addTwigChartFunctionPlugins()andgetTwigChartFunctionPlugins()methods. Chart plugins are registered inChartGuiDependencyProvider::getChartPlugins(). - Removed the Zed
ChartConfig::getDefaultChartLayout()method. - Removed the
Count orders,SKUandTitleZed translations.spryker/chart-guiandspryker/dashboardprovide the translations the Back Office charts use.
Improvements
- Introduced chart view strategies for the Back Office, exported from
@zed/chart/js/modulesasChartFactory,mountCharts(),createDefaultChartStrategies(),AbstractChartStrategyandEChartsChartStrategy. Thecartesian,daily-bar,pie,order-statusandrankingviews were provided. - Added the chart markup contract: each
[data-chart]element is drawn by the strategy of the view named in its payload, from the<template data-chart-template>markup inside it. - Added the error state: a chart whose view is unknown or missing, or that fails to load, renders the
error-statetemplate. - Added
ChartDataTransfer.viewto select the chart view.
Adjustments
- Replaced the
plotly.js-dist-minfrontend dependency withechartsand removed theassert,bufferandstream-browserifydev dependencies. - Removed the
spryker/twig-extensionrequirement and added a conflict withspryker/chart-guibelow2.0.0. - Adjusted the
ChartLayoutablePluginInterface::getChartLayout()specification: the Back Office chart Twig functions ofspryker/chart-gui2.0.0 and later ignore it.