Pie Legend Missing

Thread is closed for posting
10 posts, 0 answers
  1. Alan Wang
    Alan Wang avatar
    40 posts
    Member since:
    Jul 2012

    Posted 18 Jan 2011 Link to this post

    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

  2. Alan Wang
    Alan Wang avatar
    40 posts
    Member since:
    Jul 2012

    Posted 20 Jan 2011 Link to this post

    Can anyone help me please???
  3. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 21 Jan 2011 Link to this post

    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.
  4. Alan Wang
    Alan Wang avatar
    40 posts
    Member since:
    Jul 2012

    Posted 21 Jan 2011 Link to this post

    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
  5. Alan Wang
    Alan Wang avatar
    40 posts
    Member since:
    Jul 2012

    Posted 23 Jan 2011 Link to this post

    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
  6. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 24 Jan 2011 Link to this post

    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.
  7. Alan Wang
    Alan Wang avatar
    40 posts
    Member since:
    Jul 2012

    Posted 24 Jan 2011 Link to this post

    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
  8. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 26 Jan 2011 Link to this post

    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.
  9. Alan Wang
    Alan Wang avatar
    40 posts
    Member since:
    Jul 2012

    Posted 26 Jan 2011 Link to this post

    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
  10. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 31 Jan 2011 Link to this post

    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.
Back to Top