Help needed for s7graphview

If anyone have used s7graphview for plotting the graph then I want to know where to do changes in the code for maintaining the incremental value of the values that is been plot on the x-axis. Currently it maintains according to the count of array being return to it. I want to maintain incremental gap of 5 units.

Answers


I replace in drawRect: of S7GraphView class next lines (~220 line in S7GraphView.m):

if (xValuesCount > 5)
{       
    NSUInteger stepCount = 5;
    NSUInteger count = xValuesCount - 1;

    for (NSUInteger i = 4; i < 8; i++) {
        if (count % i == 0) {
            stepCount = i;
        }
    }

    step = xValuesCount / stepCount;
    maxStep = stepCount + 1;
}
else
{       
    step = 1;
    maxStep = xValuesCount;
}

with this code:

if (xValuesCount > 5)
{       
    NSUInteger stepCount = 5 - 1;

    step = xValuesCount / stepCount;
    maxStep = stepCount + 1;
}
else
{       
    step = 1;
    maxStep = xValuesCount;
}

On DemoS7GraphView project from s7graph google code page it gives me next result:

Hope it helps.


Need Your Help

Unable to load executable

c# .net windows service process

I'm attempting to create a service which opens an application, however I have had no luck. Thus, I downloaded the following sample code, and attempted to create a service based on it. However, it d...

how to change the default video buffer size in Android

android stagefright

I have found that the default video buffer size was set to 8 seconds in Gingerbread, so any clips shorter than this could not be played.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.