Work on y legend detail
This commit is contained in:
parent
23826d8a8b
commit
f74c620464
@ -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=true
|
||||||
annotation.processing.enabled.in.editor=false
|
annotation.processing.enabled.in.editor=false
|
||||||
annotation.processing.processors.list=
|
annotation.processing.processors.list=
|
||||||
|
@ -17,6 +17,7 @@ import javax.swing.JViewport;
|
|||||||
import javax.swing.Scrollable;
|
import javax.swing.Scrollable;
|
||||||
import sesim.MinMax;
|
import sesim.MinMax;
|
||||||
import sesim.Scheduler;
|
import sesim.Scheduler;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -125,6 +125,7 @@ public class MasterChart extends javax.swing.JPanel implements QuoteReceiver {
|
|||||||
|
|
||||||
chartDef = new ChartDef();
|
chartDef = new ChartDef();
|
||||||
chartDef.x_unit_width = 3.0;
|
chartDef.x_unit_width = 3.0;
|
||||||
|
chartDef.mainChart=this.chart;
|
||||||
|
|
||||||
if (Globals.se == null) {
|
if (Globals.se == null) {
|
||||||
return;
|
return;
|
||||||
|
@ -96,6 +96,11 @@ abstract public class ChartPainter implements ChartPainterInterface{
|
|||||||
return (-(y - y_height)) / y_scaling + y_min;
|
return (-(y - y_height)) / y_scaling + y_min;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float getRoundNumber(float n){
|
||||||
|
return (float)0.0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void initGetY(MinMax minmax, Dimension dim) {
|
void initGetY(MinMax minmax, Dimension dim) {
|
||||||
y_height = dim.height;
|
y_height = dim.height;
|
||||||
@ -103,6 +108,7 @@ abstract public class ChartPainter implements ChartPainterInterface{
|
|||||||
y_min = minmax.getMin();
|
y_min = minmax.getMin();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
abstract public void drawChart(Graphics2D g, ChartPanel p, ChartDef def);
|
abstract public void drawChart(Graphics2D g, ChartPanel p, ChartDef def);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,8 @@ public class YLegendPainter extends OHLCChartPainter {
|
|||||||
public void drawChart(Graphics2D g, ChartPanel p, ChartDef def) {
|
public void drawChart(Graphics2D g, ChartPanel p, ChartDef def) {
|
||||||
init(g);
|
init(g);
|
||||||
|
|
||||||
Dimension dim = master.getSize();
|
|
||||||
|
Dimension dim = def.mainChart.getSize();
|
||||||
int first_bar = getFirstBar(master);
|
int first_bar = getFirstBar(master);
|
||||||
int last_bar = first_bar + getBars(master,def);
|
int last_bar = first_bar + getBars(master,def);
|
||||||
MinMax minmax = this.getData().getMinMax(first_bar, last_bar);
|
MinMax minmax = this.getData().getMinMax(first_bar, last_bar);
|
||||||
|
Loading…
Reference in New Issue
Block a user