Work y steps
This commit is contained in:
parent
410e9f3552
commit
f485dc6ff0
@ -261,7 +261,7 @@ made subject to such option by the copyright holder.
|
||||
<macrodef name="extend-manifest" uri="http://www.netbeans.org/ns/j2se-project/jnlp">
|
||||
<element name="customize"/>
|
||||
<sequential>
|
||||
<manifest file="${tmp.manifest.file}" mode="update" encoding="UTF-8">
|
||||
<manifest file="${tmp.manifest.file}" mode="update">
|
||||
<customize/>
|
||||
</manifest>
|
||||
</sequential>
|
||||
@ -306,7 +306,7 @@ made subject to such option by the copyright holder.
|
||||
|
||||
<target name="-copy-tmp-manifest" if="manifest.file">
|
||||
<property name="tmp.manifest.file" value="${build.dir}/manifest.mf"/>
|
||||
<copy file="${manifest.file}" tofile="${build.dir}/manifest.mf" encoding="${manifest.encoding}" outputencoding="UTF-8"/>
|
||||
<copy file="${manifest.file}" tofile="${build.dir}/manifest.mf"/>
|
||||
</target>
|
||||
|
||||
<target name="-set-mixed-code-properties" depends="-check-signing-possible" if="jnlp.signed.true+signjars.task.available">
|
||||
|
@ -261,7 +261,7 @@ made subject to such option by the copyright holder.
|
||||
<macrodef name="extend-manifest" uri="http://www.netbeans.org/ns/j2se-project/jnlp">
|
||||
<element name="customize"/>
|
||||
<sequential>
|
||||
<manifest file="${tmp.manifest.file}" mode="update">
|
||||
<manifest file="${tmp.manifest.file}" mode="update" encoding="UTF-8">
|
||||
<customize/>
|
||||
</manifest>
|
||||
</sequential>
|
||||
@ -306,7 +306,7 @@ made subject to such option by the copyright holder.
|
||||
|
||||
<target name="-copy-tmp-manifest" if="manifest.file">
|
||||
<property name="tmp.manifest.file" value="${build.dir}/manifest.mf"/>
|
||||
<copy file="${manifest.file}" tofile="${build.dir}/manifest.mf"/>
|
||||
<copy file="${manifest.file}" tofile="${build.dir}/manifest.mf" encoding="${manifest.encoding}" outputencoding="UTF-8"/>
|
||||
</target>
|
||||
|
||||
<target name="-set-mixed-code-properties" depends="-check-signing-possible" if="jnlp.signed.true+signjars.task.available">
|
||||
|
@ -1,4 +1,4 @@
|
||||
#Mon, 15 Jan 2018 12:50:01 +0100
|
||||
#Mon, 15 Jan 2018 23:45:43 +0100
|
||||
annotation.processing.enabled=true
|
||||
annotation.processing.enabled.in.editor=false
|
||||
annotation.processing.processors.list=
|
||||
|
@ -67,62 +67,12 @@ abstract public class ChartPainter implements ChartPainterInterface{
|
||||
|
||||
}
|
||||
|
||||
protected float y_scaling;
|
||||
protected int y_height;
|
||||
protected float y_min;
|
||||
protected float y_max;
|
||||
// protected float y_scaling;
|
||||
// protected int y_height;
|
||||
// protected float y_min;
|
||||
// protected float y_max;
|
||||
|
||||
float getY(float y) {
|
||||
//c_yscaling = ctx.rect.height / c_mm.getDiff();
|
||||
// float ys = dim.height / mm.getDiff();
|
||||
/* if (minmax.isLog()) {
|
||||
// return rect.height + rect.y - ((float) Math.log(y) - c_mm.getMin()) * ys;
|
||||
}
|
||||
*/
|
||||
// return (dim.height - ((y - minmax.getMin()) * y_scaling));
|
||||
return (y_height - ((y - y_min) * y_scaling));
|
||||
|
||||
}
|
||||
|
||||
double getValAtY(float y) {
|
||||
float val = 0;
|
||||
|
||||
/* if (c_mm.isLog()) {
|
||||
float ys = rect.height / c_mm.getDiff();
|
||||
|
||||
return Math.exp((rect.height + rect.y) / ys + c_mm.getMin() - y / ys);
|
||||
|
||||
}
|
||||
*/
|
||||
return (-(y - y_height)) / y_scaling + y_min;
|
||||
|
||||
}
|
||||
int trest;
|
||||
|
||||
protected float getRoundNumber(float n){
|
||||
|
||||
|
||||
|
||||
int ldist = this.em_size*2;
|
||||
int steps = y_height/ldist;
|
||||
|
||||
System.out.printf("Yheight: %d %d\n",y_height,trest);
|
||||
|
||||
System.out.printf("Steps = %d, h: %d\n", steps, this.y_height);
|
||||
|
||||
|
||||
|
||||
return (float)0.0;
|
||||
|
||||
}
|
||||
|
||||
void initGetY(MinMax minmax, Dimension dim) {
|
||||
y_height = dim.height;
|
||||
y_scaling = dim.height / minmax.getDiff();
|
||||
y_min = minmax.getMin();
|
||||
y_max = minmax.getMax();
|
||||
trest=11;
|
||||
}
|
||||
|
||||
@Override
|
||||
abstract public void drawChart(Graphics2D g, ChartPanel p, ChartDef def);
|
||||
|
@ -101,7 +101,52 @@ public abstract class OHLCChartPainter extends ChartPainter {
|
||||
protected float y_scaling;
|
||||
protected int y_height;
|
||||
protected float y_min;
|
||||
protected float y_max;
|
||||
|
||||
|
||||
|
||||
protected float getRoundNumber(float n){
|
||||
|
||||
|
||||
|
||||
int ldist = this.em_size*2;
|
||||
int steps = y_height/ldist;
|
||||
|
||||
System.out.printf("Yheight: %d \n",y_height);
|
||||
|
||||
System.out.printf("Steps = %d, h: %d\n", steps, this.y_height);
|
||||
|
||||
float stepsize = (y_max - y_min) / steps;
|
||||
|
||||
|
||||
|
||||
stepsize = 2;
|
||||
|
||||
// double minl10 = Math.log10(y_min);
|
||||
// double maxl10 = Math.log10(y_max);
|
||||
|
||||
double lo = Math.ceil(Math.log10(stepsize));
|
||||
double rss = Math.pow(10, lo);
|
||||
|
||||
System.out.printf("Ste size %f %f %f\n",stepsize,lo, rss);
|
||||
|
||||
|
||||
|
||||
|
||||
return (float)0.0;
|
||||
|
||||
}
|
||||
|
||||
void initGetY(MinMax minmax, Dimension dim) {
|
||||
y_height = dim.height;
|
||||
y_scaling = dim.height / minmax.getDiff();
|
||||
y_min = minmax.getMin();
|
||||
y_max = minmax.getMax();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
float getY(float y) {
|
||||
//c_yscaling = ctx.rect.height / c_mm.getDiff();
|
||||
// float ys = dim.height / mm.getDiff();
|
||||
@ -127,9 +172,8 @@ public abstract class OHLCChartPainter extends ChartPainter {
|
||||
return (-(y - y_height)) / y_scaling + y_min;
|
||||
|
||||
}
|
||||
|
||||
/* @Override
|
||||
void initGetY(MinMax minmax, Dimension dim) {
|
||||
|
||||
/* void initGetY(MinMax minmax, Dimension dim) {
|
||||
y_height = dim.height;
|
||||
y_scaling = dim.height / minmax.getDiff();
|
||||
y_min = minmax.getMin();
|
||||
|
Loading…
Reference in New Issue
Block a user