MiB
(MiB)
January 18, 2006, 2:15pm
1
How do I use CHARTAdditionalRenderInformation parameter in CHARTInfo.addData?
I construct a CHARTAdditionalRenderInformation with
CHARTAdditionalRenderInformation (“a”,“b”,“c”,“d”) but the additional render information is not shown in the Chart.
does sombody know how to use CHARTAdditionalRenderInformation?
JH1
(JH)
January 19, 2006, 12:59pm
2
to display the CHARTAdditionalRenderInformation, you must set “DataDescriptionOutputTextParams” parameters at the datadescription.
A simple example is:
m_chartInfo.addDataDescription( "Company", "#70FF70", CHARTInfo.BARCHART );
// parameter for the description
CHARTTextParamsInfo textParams = new CHARTTextParamsInfo();
textParams.setTextParams( CHARTTextParamsInfo.CHART_TEXT_POS_BOTTOM, "black", null, CHARTTextParamsInfo.CHART_TEXT_ROTATION_LEFT, 2 );
textParams.setTextParams( CHARTTextParamsInfo.CHART_TEXT_POS_CENTER, "black", null, CHARTTextParamsInfo.CHART_TEXT_ROTATION_LEFT, 2 );
textParams.setTextParams( CHARTTextParamsInfo.CHART_TEXT_POS_TOP, "black", null, CHARTTextParamsInfo.CHART_TEXT_ROTATION_NONE, 2 );
textParams.setTextParams( CHARTTextParamsInfo.CHART_TEXT_POS_ABOVE, "black", CHARTTextParamsInfo.CHART_TEXT_FONT_ARIAL, CHARTTextParamsInfo.CHART_TEXT_ROTATION_NONE, 3 );
m_chartInfo.setDataDescriptionOutputTextParams( "Company", textParams );
value = Math.round( 0 + generator.nextFloat() * 1000 );
textData = new CHARTAdditionalRenderInformation("aboveText",
CHARTAdditionalRenderInformation.CHART_PRINT_DEFAULT_TEXT,
CHARTAdditionalRenderInformation.CHART_PRINT_DEFAULT_TEXT,
CHARTAdditionalRenderInformation.CHART_PRINT_DEFAULT_TEXT);
m_chartInfo.addData( "Jan", "Company", value, textData );
An Example is in cisdemos. The Layout is “40_ChartDemoAdditionalText.html”