This is a migrated thread and some comments may be shown as answers.
Pie Legend Missing
9 Answers 39 Views
This is a migrated thread and some comments may be shown as answers.
Alan Wang
Top achievements
Rank 1
Alan Wang asked on 18 Jan 2011, 05:35 PM
Hi,

I am using adhoc tool to populate data for RadChart pie and I don't know the column name at front for DataYColumn until end user run the adhoc query. I did add DataYColumn  at run time using following code:

radChart.Series[0].DataYColumn = ds.Tables[0].Columns[1].ColumnName;
radChart.PlotArea.XAxis.DataLabelsColumn = ds.Tables[0].Columns[0].ColumnName;
radChart.ChartTitle.TextBlock.Text = ChartTitle;
radChart.Series[0].Name = SeriesName;

protected void radChart_ItemDataBound(object sender, Telerik.Charting.ChartItemDataBoundEventArgs e) {
        DataSet ds = (DataSet)ViewState["Result"];
        e.SeriesItem.Name = ((DataRowView)e.DataItem)[ds.Tables[0].Columns[0].ColumnName].ToString();
 
        e.SeriesItem.ActiveRegion.Tooltip += ((DataRowView)e.DataItem)[ds.Tables[0].Columns[0].ColumnName].ToString() + ":  " + e.SeriesItem.YValue;
    }


and aspx looks like following:
<telerik:RadChart ID="radChart" runat="server" Height="650px" AutoLayout="true" OnItemDataBound="radChart_ItemDataBound"
                                  SkinsOverrideStyles="True">
                                  <;                                                                 
                                  <ChartTitle>
                                    <TextBlock>
                                    </TextBlock>
                                  </ChartTitle>
                                  <Series>
                                    <telerik:ChartSeries>
                                      <Appearance LegendDisplayMode="ItemLabels" TextAppearance-AutoTextWrap="True">
                                      </Appearance>
                                    </telerik:ChartSeries>
                                  </Series>
                                  <PlotArea>
                                    <XAxis AutoScale="true">
                                      <Appearance TextAppearance-TextProperties-Color="Black">
                                        <TextAppearance AutoTextWrap="true">
                                        </TextAppearance>
                                        <LabelAppearance Position-AlignedPosition="Left" RotationAngle="45">
                                        </LabelAppearance>
                                      </Appearance>
                                    </XAxis>
                                  </PlotArea>
                                </telerik:RadChart>
For some reason, the Pie legend won't show up on the side.

Please help me

Alan

9 Answers, 1 is accepted

Sort by
0
Alan Wang
Top achievements
Rank 1
answered on 20 Jan 2011, 02:14 PM
Can anyone help me please???
0
Yavor
Telerik team
answered on 21 Jan 2011, 08:41 AM
Hello Alan,

Can you verify that the name of the column is properly passed, and that it is available at the time it is passed to the chart?
Additionally it is properly populated, you can open a formal support ticket, and send us a small working project, demonstrating your setup, and showing the unwanted behavior. We will debug it locally, and advise you further.

Best wishes,
Yavor
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Alan Wang
Top achievements
Rank 1
answered on 21 Jan 2011, 02:32 PM
Hi,

Thank you for your reply,

Could you please post a sample code to show me how to dynamically  populate pie Legend at run time so that I can use as reference..

Alan
0
Alan Wang
Top achievements
Rank 1
answered on 23 Jan 2011, 07:21 PM
Hi,

I think the problem is that I set the SkinsOverrideStyles is true. When I set it to false and it works. But I do want end user to apply skin at run time and can I get around with this.

Thanks

Alan
0
Yavor
Telerik team
answered on 24 Jan 2011, 09:43 AM
Hello Alan,

Attached to this message, is a small sample, which adds an item to the chart legend, once you click on the chart. You can use this as a starting point when recreating the issue which you are facing.

Best wishes,
Yavor
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Alan Wang
Top achievements
Rank 1
answered on 24 Jan 2011, 03:27 PM
Hi,

Thank you very much for your help and sample code. I just found out that if I set SkinsOverrideStyles= true, the pie legend doesn't display, but when I set it to false, the legend displays fine. The problem is that we do want end user to select skin at run time. In order to apply skin at run time, I have to set SkinsOverrideStyles=true.

Now my question is how can I get around with this, allow end user to apply skin at run time and display pie legend correctly.

Please give me some advice. I have been played with it all weekend and can't find solution.

Thanks
Alan
0
Yavor
Telerik team
answered on 26 Jan 2011, 09:29 AM
Hi Alan,

I double-tested the application sent earlier, and the legend showed regardless of the setting for SkinsOverrideStyles. As mentioned previously, if this is displaying a different behavior at your end, you can open a formal support ticket, and send us the problematic sample. You can use the sample I sent earlier as a starting point, to which you can apply any additional code changes, or send the original code.

Regards,
Yavor
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Alan Wang
Top achievements
Rank 1
answered on 26 Jan 2011, 03:49 PM
Hi,

Good news is I can create legend at run time and bad news is the legend can't adopt the skin style which applied to pie report. Could you please help?

Alan
0
Yavor
Telerik team
answered on 31 Jan 2011, 08:01 AM
Hi Alan,

As I mentioned previously, based on the supplied information, it is hard to determine what is causing this unwanted behavior. To address the issue properly, it will be best if you open a formal support ticket, and send us a small working project, demonstrating your setup, and showing the unwanted behavior. We will debug it locally, and advise you further.

Regards,
Yavor
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Asked by
Alan Wang
Top achievements
Rank 1
Answers by
Alan Wang
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or