mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
get plot dimensions from css (not hardcoded)
This commit is contained in:
parent
3fea3fafb0
commit
a0a2ff47a8
3 changed files with 6 additions and 6 deletions
|
@ -38,8 +38,8 @@ function addSampleToData(data, sampleNumber, sensorData) {
|
|||
|
||||
function initGraphHelpers(selector, sampleNumber, heightDomain) {
|
||||
var margin = {top: 20, right: 20, bottom: 10, left: 40};
|
||||
var width = 720 - margin.left - margin.right;
|
||||
var height = 140 - margin.top - margin.bottom;
|
||||
var width = $(selector).width() - margin.left - margin.right;
|
||||
var height = $(selector).height() - margin.top - margin.bottom;
|
||||
|
||||
var helpers = {selector: selector, dynamicHeightDomain: !heightDomain};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue