Skip to content

Commit

Permalink
Merge branch 'master' into sharp-everything
Browse files Browse the repository at this point in the history
  • Loading branch information
WofWca committed Dec 7, 2021
2 parents b80a73a + 7052690 commit 0eacd38
Show file tree
Hide file tree
Showing 2 changed files with 171 additions and 138 deletions.
33 changes: 19 additions & 14 deletions builder/index.html
Expand Up @@ -413,6 +413,7 @@
return value !== 0;
}
});

// Series
startControlSection('Series');
bindColor({target: chart.seriesSet[0].options, name: 'Series line color', propertyName: 'strokeStyle', optional: true, enabled: true, opacity: 1, emptyValue: 'none'});
Expand All @@ -430,7 +431,18 @@
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: 'Draw border', propertyName: 'borderVisible'});
bindCheckBox({target: chart.options.grid, name: 'Draw outer border', propertyName: 'borderVisible'});
bindCheckBox({
target: chart.options,
name: 'Show y-value lines',
propertyName: 'horizontalLines',
convert: function (checked) {
return checked ? sampleHorizontalLines : [];
},
convertBack: function (value) {
return value && !!value.length;
}
});

// Labels
startControlSection('Labels');
Expand Down Expand Up @@ -467,6 +479,12 @@
}
});

// Tool tip
startControlSection('Tool tip');
bindCheckBox({target: chart.options, name: 'Show tool tip on hover', propertyName: 'tooltip'});
bindRange({target: chart.options.tooltipLine, name: 'Tool tip line width', propertyName: 'lineWidth', min: 1, max: 5});
bindColor({target: chart.options.tooltipLine, name: 'Tool tip line color', propertyName: 'strokeStyle', opacity: 1});

// Y-scaling
startControlSection('Y-scaling');
bindCheckBox({
Expand Down Expand Up @@ -496,19 +514,6 @@
return checked ? customYRangeFunction : undefined;
}
});

// Misc
bindCheckBox({
target: chart.options,
name: 'Show y-value lines',
propertyName: 'horizontalLines',
convert: function (checked) {
return checked ? sampleHorizontalLines : [];
},
convertBack: function (value) {
return value && !!value.length;
}
});
}

</script>
Expand Down

0 comments on commit 0eacd38

Please sign in to comment.