- (light, dark, midnight) Fix minor alignment issues with Arabic CSS
- JRobin (graphs):
  - Fix font size issue for non-title text on graphs
  - Optimise layout (tweaked padding, legend box size etc)
  - Tweak graph lines (now dotted, slightly less opaque)
This commit is contained in:
str4d
2017-06-03 14:11:33 +00:00
parent 6acca28969
commit 5e8730a616
10 changed files with 270 additions and 36 deletions

View File

@ -161,12 +161,12 @@ public interface RrdGraphConstants {
/**
* Default minor grid color
*/
Color DEFAULT_GRID_COLOR = new Color(171, 171, 171, 95);
Color DEFAULT_GRID_COLOR = new Color(100, 100, 100, 75);
// Color DEFAULT_GRID_COLOR = new Color(140, 140, 140);
/**
* Default major grid color
*/
Color DEFAULT_MGRID_COLOR = new Color(255, 91, 91, 95);
Color DEFAULT_MGRID_COLOR = new Color(255, 91, 91, 110);
// Color DEFAULT_MGRID_COLOR = new Color(130, 30, 30);
/**
* Default font color
@ -251,7 +251,7 @@ public interface RrdGraphConstants {
* Default font name, determined based on the current operating system
*/
String DEFAULT_FONT_NAME = System.getProperty("os.name").toLowerCase().contains("windows") ?
"Lucida Sans Typewriter" : "Monospaced";
"Lucida Console" : "Monospaced";
/**
* Default graph small font
@ -278,7 +278,7 @@ public interface RrdGraphConstants {
/**
* Used internally
*/
double LEGEND_BOX = 0.9; // chars
double LEGEND_BOX = 0.7; // chars
/**
* Used internally
*/
@ -286,27 +286,27 @@ public interface RrdGraphConstants {
/**
* Used internally
*/
int PADDING_LEFT = 10; // pix
int PADDING_LEFT = 5; // pix
/**
* Used internally
*/
int PADDING_TOP = 12; // pix
int PADDING_TOP = 9; // pix
/**
* Used internally
*/
int PADDING_TITLE = 6; // pix
int PADDING_TITLE = 7; // pix
/**
* Used internally
*/
int PADDING_RIGHT = 16; // pix
int PADDING_RIGHT = 20; // pix
/**
* Used internally
*/
int PADDING_PLOT = 2; //chars
double PADDING_PLOT = 1.7; //chars
/**
* Used internally
*/
int PADDING_LEGEND = 2; // chars
double PADDING_LEGEND = 2.1; // chars
/**
* Used internally
*/
@ -320,10 +320,10 @@ public interface RrdGraphConstants {
* Stroke used to draw grid
*/
// solid line
Stroke GRID_STROKE = new BasicStroke(1);
//Stroke GRID_STROKE = new BasicStroke(1);
// dotted line
// Stroke GRID_STROKE = new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1, new float[] {1, 1}, 0);
Stroke GRID_STROKE = new BasicStroke(1, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 1, new float[] {1, 1}, 0);
/**
* Stroke used to draw ticks
*/

View File

@ -132,11 +132,11 @@ public class RrdGraphDef implements RrdGraphConstants {
fontDir = new File(fontdirProperty);
}
fonts[FONTTAG_DEFAULT] = new Font(DEFAULT_FONT_NAME, Font.PLAIN, 8);
fonts[FONTTAG_TITLE] = new Font(DEFAULT_FONT_NAME, Font.PLAIN, 9);
fonts[FONTTAG_AXIS] = new Font(DEFAULT_FONT_NAME, Font.PLAIN, 7);
fonts[FONTTAG_UNIT] = new Font(DEFAULT_FONT_NAME, Font.PLAIN, 8);
fonts[FONTTAG_LEGEND] = new Font(DEFAULT_FONT_NAME, Font.PLAIN, 8);
fonts[FONTTAG_DEFAULT] = new Font(DEFAULT_FONT_NAME, Font.PLAIN, 10);
fonts[FONTTAG_TITLE] = new Font(DEFAULT_FONT_NAME, Font.PLAIN, 10);
fonts[FONTTAG_AXIS] = new Font("Droid Sans Mono", Font.PLAIN, 10);
fonts[FONTTAG_UNIT] = new Font(DEFAULT_FONT_NAME, Font.PLAIN, 10);
fonts[FONTTAG_LEGEND] = new Font("Droid Sans Mono", Font.PLAIN, 10);
fonts[FONTTAG_WATERMARK] = new Font(DEFAULT_FONT_NAME, Font.PLAIN, 1).deriveFont(5.5F);
}
@ -173,7 +173,7 @@ public class RrdGraphDef implements RrdGraphConstants {
if (exception != null) {
System.err.println(exception.getLocalizedMessage());
}
font = new Font(DEFAULT_FONT_NAME, Font.PLAIN, 10);
font = new Font("Monospaced", Font.PLAIN, 10);
}
if (font == null) {