|
|
|
@ -1,15 +1,9 @@
|
|
|
|
|
package com.fr.van.chart.designer.style.axis; |
|
|
|
|
|
|
|
|
|
import com.fr.base.chart.chartdata.TopDefinitionProvider; |
|
|
|
|
import com.fr.chart.chartattr.ChartCollection; |
|
|
|
|
import com.fr.chart.chartattr.Plot; |
|
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
|
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPane; |
|
|
|
|
import com.fr.design.mainframe.chart.gui.style.ChartTextAttrPaneWithThemeStyle; |
|
|
|
|
import com.fr.design.mainframe.chart.mode.ChartEditContext; |
|
|
|
|
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.designer.TableLayout4VanChartHelper; |
|
|
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
@ -33,24 +27,4 @@ public class VanChartAxisPaneHelper {
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 在update数据集分类的时候,需要联动update一下样式-坐标轴里面的分层样式设置,来自CHART-22873 |
|
|
|
|
* |
|
|
|
|
* @param collection |
|
|
|
|
*/ |
|
|
|
|
public static void updateAxisCategoryStyles(ChartCollection collection) { |
|
|
|
|
TopDefinitionProvider definition = collection.getSelectedChart().getFilterDefinition(); |
|
|
|
|
int size = definition == null ? 1 : definition.getMoreCateSize() + 1; |
|
|
|
|
|
|
|
|
|
Plot plot = collection.getSelectedChart().getPlot(); |
|
|
|
|
if (plot instanceof VanChartAxisPlot) { |
|
|
|
|
for(VanChartAxis axis : ((VanChartAxisPlot) plot).getXAxisList()){ |
|
|
|
|
axis.clearCategoryStyles(); |
|
|
|
|
for (int i = 0; i < size; i++) { |
|
|
|
|
axis.addCategoryStyle(new VanChartAxisLabelStyle()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|