Community & Support
Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Chart > Bind the string values in X axis

Not answered Bind the string values in X axis

Feed from this thread
  • Posted on Sep 19, 2008 (permalink)

    Hi,

         How to bind the string values in the x axis? .I already see one of u r previous example that to set the autoscale property for the x axis to false.Then set the text property to the corresponding axis.In u r example i saw that u done all these property settings within the PlotArea.But in my  plotarea i didn't get this Xaxis within this area.So what's this problem is this due to any version problem or anything else.In the aspx page i add the assembly like this in top of my design page

    %@ Register TagPrefix="radc" Namespace="Telerik.WebControls" Assembly="RadChart.Net2" %>
    <%@ Register TagPrefix="radc" Namespace="Telerik.Charting" Assembly="RadChart.NET2" %>

               Here in my rad chart control i am also didn't get the autowraptext property .

    What's the solution for this?
    Help me immediately.....

    Reply

  • Matthew Bishop avatar

    Posted on Sep 20, 2008 (permalink)

    Giri, unless I miss my guess, your using the old version of the controls, not version 2.0.4.0 for .net 3.5 right?
    Because the new assembly code looks like this:

    <%

    @ Register assembly="Telerik.Charting, Version=2.0.4.0, Culture=neutral, PublicKeyToken=d14f3dcc8e3e8763" namespace="Telerik.Charting" tagprefix="telerik" %>


    If so, i took a look at some of my old code and I used this,

     

    ArrayList

    d1 = new ArrayList();
    d1.Add(
    "blah 1");
    d1.Add(
    "blah 2");
    d1.Add(
    "blah 3");
    d1.Add(
    "blah 4");
    for(int i=0;i!=d1.Count;i++)
    {
    RadChart1.XAxis.AddItem(d1[i].ToString());
    }

    Reply

  • Posted on Sep 22, 2008 (permalink)

    Hi Matthew,
                 
                       I am using older version of RadChart.That'swhy i didn't get some of the properties.Now i am clear in this problem.Thanks for u r help.Then i have another problem in my chart.In my chart a series have four bars when i click the particular bar i want to take the X label text of that particular bar.Here in this chart i am binding the string values for x axis so each bar has different label in its axis.I know it will write in the chart click event but i don't know how to take the particular x label text.

    Give me a suggestion
    Thanks ,

    Reply

  • Matthew Bishop avatar

    Posted on Sep 22, 2008 (permalink)

    Hi Giri,
    your in luck, i think i just doing what you want right now! so try this. Create the click event by dbl clicking on the chart in the designer then this should work:

    protected

    void RadChart1_Click(object sender, ChartClickEventArgs args)
    {
    if (args.SeriesItem != null)
    {
    RadAjaxManager1.Alert(RadChart1.ChartTitle.TextBlock.Text.ToString() +
    "\\n" + args.Series.ToString() + "\\n" + RadChart1.PlotArea.XAxis.Items[args.SeriesItem.Index].TextBlock.Text);
    }
    }

    That should give you the Chart name, the series name of what was clicked, and the xaxis value.
    Hope it helps :)

    Reply

  • Posted on Sep 22, 2008 (permalink)

    Hi Matthew,

                   What a coincidence.....Great u r codings are very helpful to me.Now i am getting the x axis label value correctly.

    Thanks,

    Reply

  • Q1 Webinar Week

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Chart > Bind the string values in X axis
Related resources for "Bind the string values in X axis"

ASP.NET Chart Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]