Node domainTitle = chartNode.selectSingleNode( DOMAIN_TITLE_NODE_LOC );
Node domainTitleFont = chartNode.selectSingleNode( DOMAIN_TITLE_FONT_NODE_LOC );
Node titleFont = chartNode.selectSingleNode( TITLE_FONT_NODE_LOC );
if ( getValue( title ) != null ) {
Text titleText = new Text();
titleText.setText( getValue( title ) );
titleText.setStyle( buildCSSStringFromNode( titleFont ) );
chart.setTitle( titleText );
}
Text domainText = new Text();
if ( getValue( domainTitle ) != null ) {
domainText.setText( getValue( domainTitle ) );
} else {
// TODO figure out what to do if the header isn't CategoryDataset
domainText.setText( columnHeaders[0] );
}
domainText.setStyle( buildCSSStringFromNode( domainTitleFont ) );
Text rangeText = new Text();
if ( getValue( rangeTitle ) != null ) {
rangeText.setText( getValue( rangeTitle ) );
rangeText.setStyle( buildCSSStringFromNode( rangeTitleFont ) );
chart.setYLegend( rangeText );
}
// TODO: need to support YRightLegend, exposed as y2_legend in open flash charts