absolute values on x and y-axis

Posted by user608366 
absolute values on x and y-axis
February 23, 2011 08:12AM
Do you know of any property by which we can set hardcoded values for x-axis and y-axis in JSCharts?

e.g. it requires me to have a point in graph (0, pt-y) in order for value ‘0’ to appear on x-axis.

Is the calliberation on x and y axes automatic based on the points data that we give? Can we set hardcoded values for these axis?

I want to fix the scale.
x-axis: 0 to 10 seconds; calliberation at 0, 0.20, 0.40, 0.60....9.60, 9.80, 10
y-axis: 0 to 4 millivolts; calliberation at 0, 0.5, 1, 1.5...3.5, 4



Edited 1 time(s). Last edit at 02/23/2011 08:41AM by user608366.
Re: absolute values on x and y-axis
February 23, 2011 08:41AM
The calibration is done automatically (but you can set the axes limits if you want), but we do not fully support negative values - we do not guaranty the graph is generated correctly. If the graph doesn't look right with negative values, you can try a workaround - you can hide the values and create labels:

myChart.setDataArray([[0, 9], [1, 7], [2, 8], [3, 6], [4, 3], [5, 6]]);
myChart.setShowXValues(false);
myChart.setLabelX ([0, '-2']);
myChart.setLabelX ([1, '-1']);
myChart.setLabelX ([2, '0']);
myChart.setLabelX ([3, '1']);
myChart.setLabelX ([4, '2']);
myChart.setLabelX ([5, '3']);
myChart.draw();

The axes cannot be "moved" anyway, they will always appear at the bottom and left side of the graph.

Sabin

--------------------
JS Charts - Created by Smartketer LLC



Edited 1 time(s). Last edit at 02/23/2011 08:55AM by sabinmunteanu.
Re: absolute values on x and y-axis
February 23, 2011 08:52AM
Quote
The calibration is done automatically (but you can set the axes limits if you want)

How do you set the axis limit? Are you talking about 'setAxisValuesNumberX'?

If the calliberation is done automatically, and if my data set is ([3,4],[4,5],[5,6],[6,7],[7,8]) then it will never calliberate the value 0 or 1 on x-axis, Is this correct? If so, what is the workaround considering I want to calliberate 1,2,3,4,5,6,7,8,9,10 on x-axis?
Re: absolute values on x and y-axis
February 23, 2011 09:00AM
I was refering to the setInterval...() methods. In your case:
setIntervalStartX (1);
setIntervalEndX (10);

Sabin

--------------------
JS Charts - Created by Smartketer LLC
Re: absolute values on x and y-axis
February 23, 2011 09:08AM
Thanks Sabin,

That is what I was looking for. setInterval methods did the work in combination with setAxisValuesNumber methods.



Edited 1 time(s). Last edit at 02/23/2011 09:10AM by user608366.
Re: absolute values on x and y-axis
July 28, 2011 09:26PM
Hello,
Sorry I have a problem with IE7. This does not happen in Chrome

Apparently the generated image where the chart is drawn is causing some problems at the top-left of my screen disabling my controls.
It seems that even when the calibration happens automatically the top and left values in the style of the IMG remain as "zero"

<MAP id="map_JSChart_ChartNotificationPlugIn">
<IMG style="BORDER-TOP-WIDTH: 0px; 
BORDER-LEFT-WIDTH: 0px; Z-INDEX: 10; 
FILTER: alpha(opacity=0); 
BORDER-BOTTOM-WIDTH: 0px; 
CLIP: rect(0px 400px 300px 0px); 
POSITION: absolute; left: 0px; top: 0px; 
BORDER-RIGHT-WIDTH: 0px"
height="300" 
src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" width="400" useMap="#map_JSChart_ChartNotificationPlugIn" />
</MAP>

Notice POSITION: absolute; left: 0px; top: 0px; This is causing a big box at my top left corner that is displayed over my controls rendering them unusable.

Can you help me to figure out how can I work around this issue?

Thanks!
Sorry, you do not have permission to post/reply in this forum.