Improving x legend
This commit is contained in:
parent
f6cc6bbb7d
commit
bcb8bb9e38
@ -15,8 +15,10 @@
|
||||
</Menu>
|
||||
<MenuItem class="javax.swing.JCheckBoxMenuItem" name="jCheckBoxMenuItem1">
|
||||
<Properties>
|
||||
<Property name="mnemonic" type="int" value="108"/>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="jCheckBoxMenuItem1"/>
|
||||
<Property name="text" type="java.lang.String" value="Log Scale"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value=""/>
|
||||
</Properties>
|
||||
</MenuItem>
|
||||
</SubComponents>
|
||||
|
@ -148,7 +148,7 @@ public class Chart extends javax.swing.JPanel implements QuoteReceiver, Scrollab
|
||||
class XLegendDef {
|
||||
|
||||
// double unit_width = 1.5;
|
||||
int big_tick = 8;
|
||||
int big_tick = 10;
|
||||
long start;
|
||||
|
||||
XLegendDef() {
|
||||
@ -191,6 +191,11 @@ public class Chart extends javax.swing.JPanel implements QuoteReceiver, Scrollab
|
||||
int n;
|
||||
double x;
|
||||
|
||||
|
||||
System.out.printf("ClipBounds w: %d\n",clip_bounds.width);
|
||||
|
||||
|
||||
|
||||
for (n = 0, x = 0; x < dim.width; x += em_size * x_unit_width) {
|
||||
|
||||
if (n % xld.big_tick == 0) {
|
||||
@ -208,14 +213,7 @@ public class Chart extends javax.swing.JPanel implements QuoteReceiver, Scrollab
|
||||
g.drawString(text, (int) x - swidth / 2, y + em_height * 2);
|
||||
}
|
||||
|
||||
OHLCDataItem d;
|
||||
try {
|
||||
d = data.data.get(n);
|
||||
} catch (Exception e) {
|
||||
d = null;
|
||||
}
|
||||
|
||||
n++;
|
||||
n+=1;
|
||||
|
||||
}
|
||||
}
|
||||
@ -571,8 +569,10 @@ public class Chart extends javax.swing.JPanel implements QuoteReceiver, Scrollab
|
||||
compMenu.setText("Compression");
|
||||
ctxMenu.add(compMenu);
|
||||
|
||||
jCheckBoxMenuItem1.setMnemonic('l');
|
||||
jCheckBoxMenuItem1.setSelected(true);
|
||||
jCheckBoxMenuItem1.setText("jCheckBoxMenuItem1");
|
||||
jCheckBoxMenuItem1.setText("Log Scale");
|
||||
jCheckBoxMenuItem1.setToolTipText("");
|
||||
ctxMenu.add(jCheckBoxMenuItem1);
|
||||
|
||||
setBackground(java.awt.Color.white);
|
||||
|
Loading…
Reference in New Issue
Block a user