Commit d85d6ef9 authored by olau@iola.dk's avatar olau@iola.dk

Patch from Mike R. Williamson to fix make set border color in options parsing code

git-svn-id: https://flot.googlecode.com/svn/trunk@126 1e0a6537-2640-0410-bfb7-f154510ff394
parent bf01441d
......@@ -25,7 +25,8 @@ Changes:
$.plot.formatDate(...) (suggestion by Matt Manela) and even
replaced.
- Added "borderColor" option to the grid (patch from achamayou).
- Added "borderColor" option to the grid (patch from achamayou and
patch from Mike R. Williamson).
Bug fixes:
......
......@@ -13,8 +13,8 @@
var series = [],
options = {
// the color theme used for graphs
colors: ["#edc240", "#afd8f8", "#cb4b4b", "#4da74d", "#9440ed"],
// the color theme used for graphs
colors: ["#edc240", "#afd8f8", "#cb4b4b", "#4da74d", "#9440ed"],
legend: {
show: true,
noColumns: 1, // number of colums in legend table
......@@ -161,7 +161,8 @@
function parseOptions(o) {
$.extend(true, options, o);
if (options.grid.borderColor == null)
options.grid.borderColor = options.grid.color
// backwards compatibility, to be removed in future
if (options.xaxis.noTicks && options.xaxis.ticks == null)
options.xaxis.ticks = options.xaxis.noTicks;
......@@ -969,7 +970,7 @@
if (options.grid.borderWidth) {
// draw border
ctx.lineWidth = options.grid.borderWidth;
ctx.strokeStyle = options.grid.borderColor ? options.grid.borderColor : options.grid.color;
ctx.strokeStyle = options.grid.borderColor;
ctx.lineJoin = "round";
ctx.strokeRect(0, 0, plotWidth, plotHeight);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment