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. Image for the cookie policy date

Logarithmic scale on Tornado Chart

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?

4 Replies

AT Anandaraj T Syncfusion Team August 26, 2013 09:01 AM UTC

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


RG Raghav Gokakkar August 30, 2013 03:00 PM UTC

Hi Anand,

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

Regards.


RG Raghav Gokakkar September 3, 2013 11:23 AM UTC

Hello,

Any update on my query please?

Regards,
Raghav


AT Anandaraj T Syncfusion Team September 3, 2013 01:04 PM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon