Exponential on X Axis

13 posts, 0 answers
  1. Mohamad
    Mohamad avatar
    6 posts
    Member since:
    Dec 2014

    Posted 17 Jan 2015 Link to this post

    Hi,

    I want to show Exponential  on XAxis,how we can do, do you have any example?

    second question, 
    Can we flip XAxis, like right side to left side.

    Thanks


  2. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 19 Jan 2015 Link to this post

    Hi Mohamad,

    If you need the axis to be logarithmic - you need to use a LogarithmicAxis instead of LinearAxis. If you want the axis to appear on the right hand side, you need to use the HorizontalLocation property of the axis.

    If I did not understand your requirements well, please send us snapshots of the desired result and more explanations.

    Regards,
    Petar Marchev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Mohamad
    Mohamad avatar
    6 posts
    Member since:
    Dec 2014

    Posted 08 Feb 2015 in reply to Petar Marchev Link to this post

    I need like this:

    can you give me with some demo binding datatable??

  5. Mohamad
    Mohamad avatar
    6 posts
    Member since:
    Dec 2014

    Posted 08 Feb 2015 in reply to Petar Marchev Link to this post

    Can you help me to plot this kind of report,
    I have to bind with datatable. and this kind of Chart
  6. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 09 Feb 2015 Link to this post

    Hi Mohamad,

    You can find our Binding to a DataTable help article here. You can see how to use point series in our help documentation, sdk sample and qsf example. I hope this information helps.

    Regards,
    Petar Marchev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  7. Mohamad
    Mohamad avatar
    6 posts
    Member since:
    Dec 2014

    Posted 09 Feb 2015 in reply to Petar Marchev Link to this post

    Thanks for reply, I can bind using datatable, but unable a chart using datatable, try to follow given example.
    Can you please help me to plot attached chart?? i am using below code, but can not do it, pleases find attached report image

    Code here, but can not see plotting, we can see data in excel so our data seems correct.

    <telerik:RadCartesianChart x:Name="chartView"  Palette="Windows8">
          <telerik:RadCartesianChart.VerticalAxis>
            <telerik:CategoricalAxis />
          </telerik:RadCartesianChart.VerticalAxis>
          <telerik:RadCartesianChart.HorizontalAxis>
            <telerik:LogarithmicAxis />
          </telerik:RadCartesianChart.HorizontalAxis>
          <telerik:RadCartesianChart.Series>
            <telerik:PointSeries x:Name="barSeries1" ItemsSource="{Binding}" ShowLabels="False" />
          </telerik:RadCartesianChart.Series>
        </telerik:RadCartesianChart>
  8. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 11 Feb 2015 Link to this post

    Hello Mohamad,

    Everything in the xaml looks correct. Can you share the code behind too?

    Regards,
    Petar Marchev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  9. Mohamad
    Mohamad avatar
    6 posts
    Member since:
    Dec 2014

    Posted 11 Feb 2015 in reply to Petar Marchev Link to this post

    here code behind logic:
    please suggest us, this is main module we need to deliver.
    let us know if you need any thing else

    but  i have given you everything xmal. codebehind and image 

     void LoadChart(EscattergramViewModel _vm)
        {
          try
          {


            DataTable dt = new DataTable();
            dt = _vm.DV.Table;
            this.DataContext = dt.Rows;

            this.barSeries1.ValueBinding =
            new Telerik.Windows.Controls.ChartView.GenericDataPointBinding<DataRow, double>()
            {
              ValueSelector = row => (double)row["AVG"]
            };

            this.barSeries1.CategoryBinding =
                new Telerik.Windows.Controls.ChartView.GenericDataPointBinding<DataRow, double>()
                {
                  ValueSelector = row => (double)row["VI"]
                };


          }
          catch (Exception ex)
          { }
        }
  10. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 11 Feb 2015 Link to this post

    Hi Mohamad,

    I am unsure why you are experiencing problems on your side. I have created a simple project with the code you provided and everything works as expected. I have attached the project and a snapshot for your reference.

    Regards,
    Petar Marchev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  11. Mohamad
    Mohamad avatar
    6 posts
    Member since:
    Dec 2014

    Posted 11 Feb 2015 in reply to Petar Marchev Link to this post

    Hello Petar,

    I sent you a separate email with the spreadsheet attached. 
  12. Ashok
    Ashok avatar
    3 posts
    Member since:
    Jun 2009

    Posted 11 Feb 2015 Link to this post

    Hello Peter,
    your demo code looks okay to me, but when we are plotting with real data, chart appear so badly,
    you have excel data which forwarded by Mohamad, you can still use Datatable and same thing, just load this data into your example using oledb or Ado.net.
    Can plot with this data?? and share code with us.

    appreciate your help.

    Thanks
    Ashok-
  13. Ashok
    Ashok avatar
    3 posts
    Member since:
    Jun 2009

    Posted 12 Feb 2015 Link to this post

    Hello Peter,
    how we can attached zip file here, does not allow me, 
    so i can attached my excel data and plot , so you can see , why not telerik generating same plot.

    Thanks
  14. Petar Marchev
    Admin
    Petar Marchev avatar
    968 posts

    Posted 13 Feb 2015 Link to this post

    Hello,

    I downloaded the excel file and decided to simply copy-paste the values in code behind. I successfully did that and I ran the application with no problems. However, since the values are numeric values it makes little sense to use a CategoricalAxis and the categorical PointSeries. This is why I updated the project to use a ScatterPointSeries and two numeric axes - one linear, one logarithmic.

    Now the output of the chart is very similar to the image of the chart you attached. You can read more about the categorical and scatter series in our documentation (point series, scatter point series).

    I will try to quickly explain the difference between the two.
    The categorical series treat the categories as separate entities. Often these cannot even be compared to each other because categories may be "Bananas", "Volume", "Bolts", "4.56", "2015/01/02" and others. The categorical axis allocates a single slot for each individual category. Later the points with this category are arranged in correspondence to this axis slot.
    The scatter series treat the values as values that make sense in some continuous range - such as numbers or DateTime. In the scatter series you have notion of continuity and if you have a linear range [0, 5] you can easily calculate the position of 3.14 and 2.71. However if you work with a categorical axis and you have these categories (1, 2, 3, 4, 5) - you cannot find the location of 2.5 because it is not present in the categories.

    Ashok, this is s public forum thread in which you can attach only images. You can attach other files only in a private support ticket.

    Let us know if you need more information.

    Regards,
    Petar Marchev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for WPF is Visual Studio 2017 Ready