1
0
Fork 0
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:
cTn 2014-04-13 14:49:29 +02:00
parent 3fea3fafb0
commit a0a2ff47a8
3 changed files with 6 additions and 6 deletions

View file

@ -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};