Skip to content

Commit

Permalink
remove the grid.sharpLines option
Browse files Browse the repository at this point in the history
This reverts f1a0a88
  • Loading branch information
WofWca committed Sep 22, 2021
1 parent 1fffdd8 commit a0648dc
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
1 change: 0 additions & 1 deletion builder/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@
bindColor({target: chart.options.grid, name: 'Grid line color', propertyName: 'strokeStyle', opacity: 1});
bindRange({target: chart.options.grid, name: 'Vertical sections', propertyName: 'verticalSections', min: 0, max: 20});
bindRange({target: chart.options.grid, name: 'Time line spacing', propertyName: 'millisPerLine', min: 1000, max: 10000, step: 1000});
bindCheckBox({target: chart.options.grid, name: 'Sharp grid lines', propertyName: 'sharpLines'});
bindCheckBox({target: chart.options.grid, name: 'Draw border', propertyName: 'borderVisible'});

// Labels
Expand Down
2 changes: 0 additions & 2 deletions smoothie.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ export interface IGridOptions {
strokeStyle?: string;
/** Distance between vertical grid lines. */
millisPerLine?: number;
/** Controls whether grid lines are 1px sharp, or softened. */
sharpLines?: boolean;
/** Number of vertical sections marked out by horizontal grid lines. */
verticalSections?: number;
/** Whether the grid lines trace the border of the chart or not. */
Expand Down
11 changes: 0 additions & 11 deletions smoothie.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@
* lineWidth: 1, // the pixel width of grid lines
* strokeStyle: '#777777', // colour of grid lines
* millisPerLine: 1000, // distance between vertical grid lines
* sharpLines: false, // controls whether grid lines are 1px sharp, or softened
* verticalSections: 2, // number of vertical sections marked out by horizontal grid lines
* borderVisible: true // whether the grid lines trace the border of the chart or not
* },
Expand Down Expand Up @@ -388,7 +387,6 @@
fillStyle: '#000000',
strokeStyle: '#777777',
lineWidth: 1,
sharpLines: false,
millisPerLine: 1000,
verticalSections: 2,
borderVisible: true
Expand Down Expand Up @@ -864,9 +862,6 @@
t >= oldestValidTime;
t -= chartOptions.grid.millisPerLine) {
var gx = timeToXPixel(t);
if (chartOptions.grid.sharpLines) {
gx -= 0.5;
}
context.moveTo(gx, 0);
context.lineTo(gx, dimensions.height);
}
Expand All @@ -877,9 +872,6 @@
// Horizontal (value) dividers.
for (var v = 1; v < chartOptions.grid.verticalSections; v++) {
var gy = Math.round(v * dimensions.height / chartOptions.grid.verticalSections);
if (chartOptions.grid.sharpLines) {
gy -= 0.5;
}
context.beginPath();
context.moveTo(0, gy);
context.lineTo(dimensions.width, gy);
Expand Down Expand Up @@ -1034,9 +1026,6 @@
var stepPixels = dimensions.height / chartOptions.grid.verticalSections;
for (var v = 1; v < chartOptions.grid.verticalSections; v++) {
var gy = dimensions.height - Math.round(v * stepPixels);
if (chartOptions.grid.sharpLines) {
gy -= 0.5;
}
var yValue = chartOptions.yIntermediateFormatter(this.valueRange.min + (v * step), chartOptions.labels.precision);
//left of right axis?
intermediateLabelPos =
Expand Down

0 comments on commit a0648dc

Please sign in to comment.