private void setupCSS ( VisualizerContext context , SVGPlot svgp , XYPlot plot ) { StyleLibrary style = context . getStyleLibrary ( ) ; for ( XYPlot . Curve curve : plot ) { CSSClass csscls = new CSSClass ( this , SERIESID + curve . getColor ( ) ) ; // csscls.setStatement(SVGConstants.SVG_STROKE_WIDTH_ATTRIBUTE, "0.2%"); csscls . setStatement ( SVGConstants . SVG_FILL_ATTRIBUTE , SVGConstants . SVG_NONE_VALUE ) ; style . lines ( ) . formatCSSClass ( csscls , curve . getColor ( ) , style . getLineWidth ( StyleLibrary . XYCURVE ) ) ; svgp . addCSSClassOrLogError ( csscls ) ; } // Axis label CSSClass label = new CSSClass ( this , CSS_AXIS_LABEL ) ; label . setStatement ( SVGConstants . CSS_FILL_PROPERTY , style . getTextColor ( StyleLibrary . XYCURVE ) ) ; label . setStatement ( SVGConstants . CSS_FONT_FAMILY_PROPERTY , style . getFontFamily ( StyleLibrary . XYCURVE ) ) ; label . setStatement ( SVGConstants . CSS_FONT_SIZE_PROPERTY , style . getTextSize ( StyleLibrary . XYCURVE ) ) ; label . setStatement ( SVGConstants . CSS_TEXT_ANCHOR_PROPERTY , SVGConstants . CSS_MIDDLE_VALUE ) ; svgp . addCSSClassOrLogError ( label ) ; svgp . updateStyleElement ( ) ; }
Setup the CSS classes for the plot .