Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graph: DataProcessor ignores step set in RrdGraphDef when choosing optimal step for plottable #50

Open
GoogleCodeExporter opened this issue Apr 6, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

data/DataProcessor.java / private void chooseOptimalStep() calculates the 
optimal step using a constant value of  pixelCount (600) instead of the step 
specified in the RrdGraphDef when the data source is not a DEF.

For a plottable, we need to specifiy the step in RrdGraphDef based on a 
non-Rrd4j data source.


To reproduce  problem:

2 days of data, samples at 3 minute intervals

    graphDef.width = 1100
    graphDef.height = 200
    graphDef.startTime = new DateTime(2013, 6,  9, 18, 0, 0, 0, DateTimeZone.UTC)
    graphDef.endTime = new DateTime(2013, 6, 11, 18, 0, 0, 0, DateTimeZone.UTC)
    graphDef.step = 3*60000  // one sample every 3 minute

    // 2 days of samples with 3 minute intervals inclusive start-end
    val sampleCnt =  1 +  (2 * 1440) / 3
    val values = new Array[Double](sampleCnt)

    values(0) =  0.005553

    //examples of spike values skipped with step 288 calculated by RrdGraph
    //based on pixel count of 600
    values(10) =  0.005553

    //another missing spike
    values(690) = 0.005553

    //last data point spike drawn high to end of graph axis,
    //(e.g. one pixel wide with trailing bar)
    values(sampleCnt-1)  =  0.005553

   //Supply data as a Plottable

What is the expected output? What do you see instead?

spikes at (10) and (690) are missing from the graph


Original issue reported on code.google.com by kelleyas...@gmail.com on 21 Aug 2013 at 7:48

Attachments:

@GoogleCodeExporter
Copy link
Author

I see no problem in your patch. But I wonder, did you try with  
DataProcessor.setPixelCount(int)  ?

Original comment by fbacche...@gmail.com on 27 Aug 2013 at 11:07

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant