ylegend is no ok when log scaling is on

This commit is contained in:
7u83 2017-03-26 08:32:38 +02:00
parent f337ab9a08
commit f233e6bd22
3 changed files with 13 additions and 11 deletions

View File

@ -4,13 +4,16 @@
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group>
<file>file:/home/tube/NetBeansProjects/SeSim/src/traders/RandomTraderA.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/test/sesim/Test.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/gui/StatisticsPanel.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/OHLCData.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/MinMax.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/build.xml</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/chart/FullChart.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/nbproject/jnlp-impl.xml</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/sesim/AutoTraderLoader.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/traders/ManTrader/ManTrader.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/gui/NewMDIApplication.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/chart/FullChart.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/nbproject/jnlp-impl.xml</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/gui/EditStrategies.java</file>
<file>file:/home/tube/NetBeansProjects/SeSim/src/chart/Chart.java</file>
</group>

View File

@ -1,4 +1,4 @@
#Sat, 25 Mar 2017 17:41:45 +0100
#Sat, 25 Mar 2017 19:09:34 +0100
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processors.list=

View File

@ -301,14 +301,13 @@ public class Chart extends javax.swing.JPanel implements QuoteReceiver, Scrollab
//val = return c_rect.height + c_rect.y - ((float)Math.log(y) - c_mm.getMin()) * ys;
// ((float)Math.log(y) - c_mm.getMin()) * ys = c_rect.height + c_rect.y
// ((float)Math.log(y) - c_mm.getMin()) = (c_rect.height + c_rect.y)/ys
// ((float)Math.log(y) = (c_rect.height + c_rect.y)/ys + c_mm.getMin())
// val + ((float)Math.log(y) - c_mm.getMin()) * ys = c_rect.height + c_rect.y
// val/ys + ((float)Math.log(y) - c_mm.getMin()) = (c_rect.height + c_rect.y)/ys
// val/ys + ((float)Math.log(y) = (c_rect.height + c_rect.y)/ys + c_mm.getMin())
//return (-(Math.exp(y)-c_rect.y-c_rect.height))/ys+c_mm.getMin();
return Math.exp( (c_rect.height + c_rect.y)/ys + c_mm.getMin() );
return Math.exp( (c_rect.height + c_rect.y)/ys + c_mm.getMin() - y/ys);
}
@ -566,8 +565,8 @@ System.out.printf("v1 %f, v2 %f\n",v1,v2);
ctx.iwidth = (float) ((x_unit_width * em_size) * 0.9f);
this.ct = ChartType.CANDLESTICK;
logs=false;
c_mm.setLog(false);
logs=true;
c_mm.setLog(true);
drawChart(ctx);
c_mm = data.getVolMinMax(first_bar, last_bar);