@ -27,6 +27,7 @@ import com.fr.plugin.chart.type.GaugeStyle;
import com.fr.plugin.chart.vanchart.VanChart ;
import com.fr.plugin.chart.vanchart.VanChart ;
import java.util.ArrayList ;
import java.util.ArrayList ;
import java.util.Arrays ;
import java.util.List ;
import java.util.List ;
/ * *
/ * *
@ -166,22 +167,28 @@ public class DefaultStyleHelper4Van {
private static void dealChartColor ( VanChartPlot vanChartPlot ) {
private static void dealChartColor ( VanChartPlot vanChartPlot ) {
ChartPreStyleConfig manager = ChartPreStyleConfig . getInstance ( ) ;
ChartPreStyleConfig manager = ChartPreStyleConfig . getInstance ( ) ;
Object preStyle = manager . getPreStyle ( DefaultStyleConstants . COLORS ) ;
Object preStyle = manager . getPreStyle ( DefaultStyleConstants . COLORS ) ;
ColorFillStyle colorFillStyle = new ColorFillStyle ( ) ;
if ( preStyle instanceof ChartColorMatching ) {
if ( preStyle instanceof ChartColorMatching ) {
ColorFillStyle colorFillStyle = new ColorFillStyle ( ) ;
//default是默认的意思,为服务器默认配色方案
//default是默认的意思,为服务器默认配色方案
//acc为多个颜色组合
//acc为多个颜色组合
//gradient为渐变颜色
//gradient为渐变颜色
colorFillStyle . setColorStyle ( ChartConstants . COLOR_ACC ) ;
colorFillStyle . setColorStyle ( ChartConstants . COLOR_ACC ) ;
colorFillStyle . setFillStyleName ( DefaultStyleConstants . COLORS ) ;
colorFillStyle . setFillStyleName ( DefaultStyleConstants . COLORS ) ;
colorFillStyle . setColorList ( ( ( ChartColorMatching ) preStyle ) . getColorList ( ) ) ;
colorFillStyle . setColorList ( ( ( ChartColorMatching ) preStyle ) . getColorList ( ) ) ;
} else {
//服务器上没有图表配色
//需要指定配色属性为自定义组合色,否则会被兼容成跟随主题
// com.fr.plugin.chart.attr.plot.VanChartPlot.compatibleFillStyle
colorFillStyle . setColorStyle ( ChartConstants . COLOR_ACC ) ;
colorFillStyle . setColorList ( Arrays . asList ( ChartConstants . NEW_FEATURES ) ) ;
}
AttrFillStyle plotFillStyle = vanChartPlot . getPlotFillStyle ( ) ;
AttrFillStyle plotFillStyle = vanChartPlot . getPlotFillStyle ( ) ;
if ( plotFillStyle = = null ) {
if ( plotFillStyle = = null ) {
plotFillStyle = new AttrFillStyle ( ) ;
plotFillStyle = new AttrFillStyle ( ) ;
vanChartPlot . setPlotFillStyle ( plotFillStyle ) ;
vanChartPlot . setPlotFillStyle ( plotFillStyle ) ;
}
plotFillStyle . setColorFillStyle ( colorFillStyle ) ;
}
}
plotFillStyle . setColorFillStyle ( colorFillStyle ) ;
}
}
private static void dealBorder ( VanChartPlot vanChartPlot ) {
private static void dealBorder ( VanChartPlot vanChartPlot ) {