Hi
I've written a piece of code that takes a timeseries of data, and display them like a linegraph. Now, I want to add normalized zones, where the data is displayed more compress / less compressed than on the normal area
Example:
Range of graph:0 - 100
Normalized area low. 0-20
Normalized area high 50-100
Normalized area's is 1/4 of the graph
Now, the real question is:
1
How can i rewrite this code so that if one of the normalized areas is removed, the graph would still work?
2
Is there a more efficient way to do this? Maybe I want even more normalized areas, and perhaps I want it to work with negative numbers as well
Some code so far
VB Code:
If value < lowlowlow Then calculatedValue = picture1.height + 500 'Out of graph area ElseIf value <= low Then area = (picture1.height / 4) / (low - lowlow) calculatedValue = (picture1.height) - (area * (value - lowlow)) ElseIf value <= highhigh Then area = (picture1.height / 4) / (highhigh - high) calculatedValue = area * (highhigh - value) ElseIf value > highhighhigh Then calculatedValue = -500 'Out of graph area End If
