Browse Source
Merge in DESIGN/design from ~ZHENG/c-design:release/11.0 to release/11.0 * commit '0965692d7b7e35d74b3d9d1254daac43a20ca446': REPORT-68886 design fix:fvs.cpt.chart 不支持主题 isThemed一直等于falsebugfix/11.0
zheng
3 years ago
6 changed files with 70 additions and 2 deletions
@ -0,0 +1,35 @@ |
|||||||
|
package com.fr.design.mainframe.chart.gui.data; |
||||||
|
|
||||||
|
import com.fr.base.chart.chartdata.TopDefinitionProvider; |
||||||
|
import com.fr.chart.chartattr.ChartCollection; |
||||||
|
import com.fr.chart.chartattr.Plot; |
||||||
|
import com.fr.plugin.chart.attr.axis.VanChartAxis; |
||||||
|
import com.fr.plugin.chart.attr.axis.VanChartAxisLabelStyle; |
||||||
|
import com.fr.plugin.chart.attr.plot.VanChartAxisPlot; |
||||||
|
import com.fr.van.chart.config.DefaultStyleHelper4Van; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author shine |
||||||
|
* @version 10.0 |
||||||
|
* Created by shine on 2022/4/6 |
||||||
|
*/ |
||||||
|
public class ChartDataHelper { |
||||||
|
|
||||||
|
/** |
||||||
|
* 在update数据集分类的时候,需要联动update一下样式-坐标轴里面的分层样式设置,来自CHART-22873 |
||||||
|
*/ |
||||||
|
public static void updateAxisCategoryStyles(ChartCollection chartCollection) { |
||||||
|
TopDefinitionProvider definition = chartCollection.getSelectedChart().getFilterDefinition(); |
||||||
|
int size = definition == null ? 1 : definition.getMoreCateSize() + 1; |
||||||
|
|
||||||
|
Plot plot = chartCollection.getSelectedChart().getPlot(); |
||||||
|
if (plot instanceof VanChartAxisPlot) { |
||||||
|
for (VanChartAxis axis : ((VanChartAxisPlot) plot).getXAxisList()) { |
||||||
|
axis.clearCategoryStyles(); |
||||||
|
for (int i = 0; i < size; i++) { |
||||||
|
axis.addCategoryStyle(DefaultStyleHelper4Van.dealAxisCheckTheme(new VanChartAxisLabelStyle())); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue