- Welcome, Guest. Please Login or Register
MindFusion  
  Version 2 of our Xamarin Calendar component adds Resource view and support for Universal Windows Platform. Now beta testing UWP version of Xamarin Diagram.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
Horizontal bar chart not supported on Logarithmic scale
Read 94 times

abhi dhotre   Offline
YaBB Newbies
*
Posts: 28
I Love MindFusion!


   
     
 
Horizontal bar chart not supported on Logarithmic scale
Aug 30th, 2017 at 6:30pm
 
Bar chart works while using a logarithmic scale but when I change the orientation of the chart to horizontal it throws an exception. Same is the case when I set bar chart layout to stack instead of side by side.

Thanks
Abhi D
 
 
 
IP Logged    
 
     

Slavcho   Online
God Member
*****
Posts: 1245
Gender: male
tech.support


   
     
 
Re: Horizontal bar chart not supported on Logarithmic scale
Reply #1 - Aug 31st, 2017 at 6:49am
 
The following changes in LogChart example will display X as logarithmic scale -

Code:
public Form1()
{

//...

originalData.YAxisLabelsDataField = "Labels";

//...

barChart.XAxis.CustomFormat = new LogCustomFormatter();
barChart.XAxis.Interval = 1;
barChart.XAxis.MaxValue = 8;

//...

barChart.ShowYCoordinates = false;
barChart.HorizontalBars = true;
}
DataTable CreateSampleData()
{
    //...
    row[0] = values[i];
    row[2] = labels[i];
    row[1] = ++i;
   //...
}
class LogSeriesAdapter : Series
 {
//...
public double GetValue(int index, int dimension)
  {
   if (dimension == 0)
    return Math.Log10(series.GetValue(index, dimension));
   return series.GetValue(index, dimension);
  }
//...
} 



Regards,
Slavcho
 
 
 
IP Logged    
 
     

abhi dhotre   Offline
YaBB Newbies
*
Posts: 28
I Love MindFusion!


   
     
 
Re: Horizontal bar chart not supported on Logarithmic scale
Reply #2 - Sep 6th, 2017 at 7:30pm
 
This code works only if I use side by side bar layout. I want to have stack bar layout, it gives me overflow error if I use stack bar layout
 
 
 
IP Logged    
 
     

Slavcho   Online
God Member
*****
Posts: 1245
Gender: male
tech.support


   
     
 
Re: Horizontal bar chart not supported on Logarithmic scale
Reply #3 - Sep 6th, 2017 at 8:46pm
 
The LogChart example does not throw exception if I switch to stacked bars. What call stack does the debugger show when it happens for you?
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print