This is a migrated thread and some comments may be shown as answers.

Exponential on X Axis

12 Answers 164 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Mohamad
Top achievements
Rank 1
Mohamad asked on 17 Jan 2015, 05:58 PM
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


12 Answers, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 19 Jan 2015, 08:18 AM
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.

 
0
Mohamad
Top achievements
Rank 1
answered on 08 Feb 2015, 06:40 AM
I need like this:

can you give me with some demo binding datatable??

0
Mohamad
Top achievements
Rank 1
answered on 09 Feb 2015, 05:08 AM
Can you help me to plot this kind of report,
I have to bind with datatable. and this kind of Chart
0
Petar Marchev
Telerik team
answered on 09 Feb 2015, 08:53 AM
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.

 
0
Mohamad
Top achievements
Rank 1
answered on 09 Feb 2015, 11:34 PM
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>
0
Petar Marchev
Telerik team
answered on 11 Feb 2015, 11:44 AM
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.

 
0
Mohamad
Top achievements
Rank 1
answered on 11 Feb 2015, 01:49 PM
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)
      { }
    }
0
Petar Marchev
Telerik team
answered on 11 Feb 2015, 05:01 PM
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.

 
0
Mohamad
Top achievements
Rank 1
answered on 11 Feb 2015, 05:50 PM
Hello Petar,

I sent you a separate email with the spreadsheet attached. 
0
Ashok
Top achievements
Rank 1
answered on 11 Feb 2015, 07:04 PM
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-
0
Ashok
Top achievements
Rank 1
answered on 12 Feb 2015, 04:12 PM
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
0
Petar Marchev
Telerik team
answered on 13 Feb 2015, 11:25 AM
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.

 
Tags
ChartView
Asked by
Mohamad
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Mohamad
Top achievements
Rank 1
Ashok
Top achievements
Rank 1
Share this question
or