Work on y legend detail

This commit is contained in:
7u83 2018-01-07 22:44:27 +01:00
parent 23826d8a8b
commit f74c620464
5 changed files with 11 additions and 2 deletions

View File

@ -1,4 +1,4 @@
#Fri, 05 Jan 2018 12:28:51 +0100
#Sat, 06 Jan 2018 13:11:03 +0100
annotation.processing.enabled=true
annotation.processing.enabled.in.editor=false
annotation.processing.processors.list=

View File

@ -20,6 +20,7 @@ import sesim.Scheduler;
/**
*
* @author 7u83 <7u83@mail.ru>

View File

@ -125,6 +125,7 @@ public class MasterChart extends javax.swing.JPanel implements QuoteReceiver {
chartDef = new ChartDef();
chartDef.x_unit_width = 3.0;
chartDef.mainChart=this.chart;
if (Globals.se == null) {
return;

View File

@ -97,12 +97,18 @@ abstract public class ChartPainter implements ChartPainterInterface{
}
float getRoundNumber(float n){
return (float)0.0;
}
void initGetY(MinMax minmax, Dimension dim) {
y_height = dim.height;
y_scaling = dim.height / minmax.getDiff();
y_min = minmax.getMin();
}
@Override
abstract public void drawChart(Graphics2D g, ChartPanel p, ChartDef def);
}

View File

@ -50,7 +50,8 @@ public class YLegendPainter extends OHLCChartPainter {
public void drawChart(Graphics2D g, ChartPanel p, ChartDef def) {
init(g);
Dimension dim = master.getSize();
Dimension dim = def.mainChart.getSize();
int first_bar = getFirstBar(master);
int last_bar = first_bar + getBars(master,def);
MinMax minmax = this.getData().getMinMax(first_bar, last_bar);