We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Logarithmic scale on Tornado Chart

Thread ID:

Created:

Updated:

Platform:

Replies:

110699 Aug 21,2013 10:20 AM Sep 3,2013 09:04 AM Windows Forms 4
loading
Tags: Chart
Raghav Gokakkar
Asked On August 21, 2013 10:20 AM

Hi, 

It seems the logarithmic scale on tornado chart is not supported. If I have a data point which is far bigger than the rest of the data points, most other values do not show up on the chart. Applying logarithmic scale distorts the chart. 

Can you advise how logarithmic scale on tornado chart be achieved?

Anandaraj T [Syncfusion]
Replied On August 26, 2013 05:01 AM

Hi Raghav,

Thanks for using Syncfusion products.

Could you please let us know whether you are using windows form or asp.net or asp.net Mvc platform? The information provided would be of great help in providing a solution.

Regards,
Anand

Raghav Gokakkar
Replied On August 30, 2013 11:00 AM

Hi Anand,

Thanks for getting back.  I would like a solution for Winforms please.

Regards.

Raghav Gokakkar
Replied On September 3, 2013 07:23 AM

Hello,

Any update on my query please?

Regards,
Raghav

Anandaraj T [Syncfusion]
Replied On September 3, 2013 09:04 AM

Hi Raghav,

Thanks for the update.

We have created a simple sample using logarithmic values in tornado chart.

Please refer the following code snippet to achieve this
<code>
[CS]

 for (int i = 1; i < 5; i++)
                //Adding logarithmic values to series points
                series.Points.Add(Math.Log(i*2), 0, rand.Next(40, 60));               
           
            series.Style.Interior = new Syncfusion.Drawing.BrushInfo(Color.Blue);

            this.chartControl1.Series.Add(series);

            ChartSeries series2 = new ChartSeries("Series2", ChartSeriesType.Tornado);

            for (int i = 1; i < 5; i++)
                series2.Points.Add(Math.Log(i*2), 0, rand.Next(-60, -40));
  
            series2.Style.Interior = new Syncfusion.Drawing.BrushInfo(Color.Crimson);
               
            //Enabling TickLabelsDrawingMode to set custom labels for axis
            this.chartControl1.PrimaryYAxis.TickLabelsDrawingMode = ChartAxisTickLabelDrawingMode.UserMode;

            //Setting labels for axis based on logarithmic values
            foreach(ChartPoint point in series.Points)
                if(point.X!=0)                   
                    this.chartControl1.PrimaryYAxis.Labels.Add(new ChartAxisLabel(Math.Log(point.X).ToString(), point.X));
                else if(point.X==0)
                    //Since Math.Log(0) is infinity, point value is directly used
                    this.chartControl1.PrimaryYAxis.Labels.Add(new ChartAxisLabel(point.X.ToString(), point.X));
</code>

Please download the sample attached and let us know if you have any concern.

Regards,
Anand


TornadoChart_a83eca58.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;