Hi,
I'm having this weird issue with the PieChart3D, where if I use the <Item_Label> for the slice labels, the words on the left side of the chart get shifted too far to the left (outside the bounds of the slice label). However, if I use something else (<DATA_VALUE>,actual text, etc.), the labels appear right where they should.
For example, in this screenshot, I have a border around the label and am using <ITEM_LABEL> for the labels. As one can see, the text of the labels appears far outside of the border for the label.
Whereas, if I use <DATA_VALUE>, the labels appear fine:
The markup that I am using in the bad pie chart is:
<PieChart3D ConcentricSpacing="0.25" OthersCategoryPercent="3" BreakAlternatingSlices="False" BreakDistancePercentage="10" BreakOthersSlice="False" ColumnIndex="-1" Concentric="False" PieThickness="20" BreakAllSlices="False" StartAngle="0" OthersCategoryText="Others" RadiusFactor="90" ShowConcentricLegend="True">
<Labels Font="Verdana, 7pt" Visible="True" FormatString="<ITEM_LABEL>" LeaderLineThickness="1" FillColor="Transparent" LeaderLinesVisible="True" BorderDrawStyle="Solid" Format="Custom" BorderThickness="1" LeaderEndStyle="ArrowAnchor" FontColor="Black" BorderColor="Black" LeaderDrawStyle="Dot"></Labels>
</PieChart3D>
Does anyone have a fix for this? Or can at least tell me why this is happening so that I can try to correct it? Thanks!
I can't seem to reproduce this problem. Can you post the version and build of the chart you're using? Do the labels fall into place if you try changing Transform3D rotation properties?
Hi Max,
I'm using WebChart version 8.1.20081.1000. I tried moving the chart to the code behind (which is where it will be for our prod env anyway) but the results were the same. Also, modifying the Transform3D x & y attributes did not help. Here is the code that I now have in my code behind, do you think it may have something to do with using a dataset as the datasource? The stored procedure returns a table with 2 columns: the first column has the data values and the second column has the labels.
//Get the dataSqlConnection mySQLconn = new SqlConnection(connectionString);mySQLconn.Open();SqlCommand mySQLcom = new SqlCommand("spTopCustomersLastYear", mySQLconn);mySQLcom.CommandType = CommandType.StoredProcedure;SqlDataAdapter adapter = new SqlDataAdapter(mySQLcom);DataSet ds = new DataSet();adapter.Fill(ds);mySQLconn.Close();
//LabelsInfragistics.UltraChart.Resources.Appearance.PieLabelAppearance pieLbl = new Infragistics.UltraChart.Resources.Appearance.PieLabelAppearance();pieLbl.Font = new System.Drawing.Font("Verdana", 7);pieLbl.FormatString = "<ITEM_LABEL>";pieLbl.Visible = true;pieLbl.LeaderLineThickness = 1;pieLbl.FillColor = System.Drawing.Color.Transparent;pieLbl.LeaderLinesVisible = true;pieLbl.BorderDrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Solid;pieLbl.Format = Infragistics.UltraChart.Shared.Styles.PieLabelFormat.Custom;pieLbl.BorderThickness = 0;pieLbl.LeaderEndStyle = Infragistics.UltraChart.Shared.Styles.LineCapStyle.ArrowAnchor;pieLbl.FontColor = System.Drawing.Color.Black;pieLbl.LeaderDrawStyle = Infragistics.UltraChart.Shared.Styles.LineDrawStyle.Dot;UltraChart1.PieChart3D.Labels = pieLbl;//End Labels
UltraChart1.DataSource = ds;UltraChart1.Data.DataBind();Page.Controls.Add(UltraChart1);
Thanks, Max! I thought I had tried that, but apparently not. I added an RTrim() to my sql output and it looks great. Thanks again and sorry to waste your time with a stupid mistake!
I was finally able to reproduce this problem. My guess is that your labels are padded with spaces on the right, but the bounding box uses trimmed label text for its dimensions. I've entered this as a bug and fixed it. The bug number is BR32379. If you need to inquire on the status of this bug in the future, you can send an email to developer support with that bug number. The fix should be included in the next available hotfix. As a workaround, you can remove the padding by trimming the label text.