Recommended Posts


Is there a different syntax for inserting a new line in tooltext of dataplot?


Im using ASP.Net and C# for building my DATA String for my chart.

When I insert {br} in tooltext for creating new line, it gives me an error that the string is in invalid format.


Please help me with this.


Thanks in advance and have a good day!

                StringBuilder xmlString = new StringBuilder();
                xmlString.AppendFormat("<chart caption='Summary of Late by Employee for the month of {1}' subcaption='Employee: {0}' showValues='1' xAxisName='Month' yAxisName = 'Late (in Minutes)' showBorder='0' bgColor='66a4ff,FFFFFF' bgRatio='60,40' canvasPadding='30' PYAxisMinValue='0' vDivlineColor='c2c2c2' rotateValues='1' anchorRadius='5' valuePadding='5' labelDisplay='rotate' slantLabels='1'>", dt.Rows[0]["EmpName"].ToString(), MonthName_);

                for (i = 0; i <= count - 1; i++)
                    xmlString.AppendFormat("<set label='{0}' value='{1}' tooltext='{0}{br} Time In: {2}' />", dt.Rows[i]["DateF_"].ToString(), dt.Rows[i]["LateMinutes"].ToString(), dt.Rows[i]["TimeInF"].ToString());
                //xmlString.Append("<set label='Sample' value='3' tooltext='name: Bob {br} Age:21' />");
                xmlString.Append("<style name='captions' type='font' font='Arial' size='12' bold='1' />");
                xmlString.Append("<style name='axisLabelBevel' type='bevel' angle='0' />");
                xmlString.Append("<style name='valuesAnim' type='animation' param='_y' start='$canvasStartY' duration='1' />");
                xmlString.Append("<style name='acnhorBevel' type='bevel' distance='2' />");
                xmlString.Append("<apply toObject='Caption' styles='captions' />");
                xmlString.Append("<apply toObject='subcaption' styles='captions' />");
                xmlString.Append("<apply toObject='xAxisName' styles='captions' />");
                xmlString.Append("<apply toObject='yAxisName' styles='captions' />");
                xmlString.Append("<apply toObject='Datavalues' styles='valuesAnim' />");
                xmlString.Append("<apply toObject='anchors' styles='acnhorBevel' />");
                ltrDrillDown.Text = FusionCharts.RenderChart("../FusionCharts/Column3D.swf", "", xmlString.ToString(), "LateDetailsChart", "600", "300", false, true);

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now