Repository navigation
Included commits: 1.1.2...2.0.0
Breaking Changes
- Replaced the Plotly charts with ECharts. The
chart,barChart,lineChartandpieChartTwig functions render@ChartGui/Chart/chart.twigand need thespryker/chart2.x script. - Removed the
@ChartGui/Chart/bar-chart.twig,@ChartGui/Chart/line-chart.twig,@ChartGui/Chart/pie-chart.twigand@ChartGui/Chart/_partials/plotly-chart.twigtemplates. ThechartContentblock moved from_partials/plotly-chart.twigto@ChartGui/Chart/chart.twig. - Changed
AbstractChartTwigPlugin::getTemplateName()from abstract to a method returning@ChartGui/Chart/chart.twig, and removed its overrides fromBarChartTwigPlugin,LineChartTwigPlugin,PieChartTwigPluginandChartTwigPlugin. - Changed the Twig context that
AbstractChartTwigPlugin::getChartContext()passes to@ChartGui/Chart/chart.twig: removedlayout, addedchartKindandchartView. WithoutchartViewthe template usesChartDataTransfer.view. - Added the
chartAssets()call to@ChartGui/Chart/chart.twig.ChartGuiTwigPluginhas to be registered in the Zed Twig plugin stack, and a project override ofchart.twighas to callchartAssets(). - Removed the deprecated
BartChartTwigPlugin- useBarChartTwigPlugininstead. - Removed
ChartGuiConfig::getDefaultChartLayout()and theChartLayouttransfer declaration. The chart size is defined by CSS now.
Improvements
- Added the chart view templates
cartesian,daily-bar,pie,order-statusandrankingand the sharedempty-stateanderror-statetemplates in@ChartGui/Chart/strategies/.chart.twigincludeschart-strategy.twigand the<view>-chart-strategy.twigof the chart's view. - Added the
chartTitle,chartBody,chartTemplatesandchartAssetsblocks to@ChartGui/Chart/chart.twig. Each chart template in@ChartGui/Chart/strategies/and@ChartGui/Chart/_partials/has its own block, named after the template (pieTemplate,legendRowTemplate, …). - A chart without
ChartDataTransfer.viewgets thepieview for a pie series and thecartesianview otherwise. AddedChartGuiCommunicationFactory::createChartViewResolver()and theAbstractChartTwigPlugin::CHART_KINDconstant. - Added the
chartAssets()Twig function and theChartGuiTwigPlugin::TWIG_FUNCTION_NAME_CHART_ASSETSconstant. A page renders the chart stylesheet and script once, however many charts it shows. - Added
ChartGuiCommunicationFactory::createChartAssetRenderer(), thechartGuiAssetsRenderedTwig global and the@ChartGui/Chart/_partials/chart-assets.twigand@ChartGui/Chart/_partials/pie-legend.twigtemplates. - Introduced the
spryker-zed-chart-gui-mainZed frontend entry with the.chart,.chart__title,.chart-plot--*,.chart-state__icon,.chart-marker,.chart-legend,.chart-legend__*,.chart-rankingand.chart-ranking__*CSS classes. The ranking list shows five rows and scrolls. - Declared
ChartDataTransferwithkey,title,tracesandview, andChartDataTraceTransferwith the properties the chart template reads. - Added the Zed translations of the chart templates, such as
Total items,Daily orders,No data to displayandChart could not be loaded.
Adjustments
- Added the
spryker/chart^2.0.0requirement. - Added a conflict with
spryker/sales-statisticsbelow1.4.0: the Top ordered products chart needs therankingview thatTopOrdersChartPluginsets since that version.