4242</head>
4343<body><div style = "display: flex;
4444 align-items:center;height:100%; width:100%;background:#dddfd4;
45- justify-content: center;"><div style="%11:99%; aspect-ratio: %9/%10;"
45+ justify-content: center;"><div style="%11:99%; %12:99%; aspect-ratio: %9/%10;"
4646id="gd"></div></div>
4747<script>
4848%1
@@ -368,7 +368,7 @@ extern const char kHtmlDateTimeModel[] = R"davis_delimeter(
368368</head>
369369<body><div style = "display: flex;
370370 align-items:center;height:100%; width:100%;background:#dddfd4;
371- justify-content: center;"><div style="%6:99%; aspect-ratio: %4/%5;"
371+ justify-content: center;"><div style="%6:99%; %7:99%; aspect-ratio: %4/%5;"
372372id="gd"></div></div>
373373
374374<script>
@@ -413,7 +413,7 @@ extern const char kHtmlMultiChartModel[] = R"davis_delimeter(
413413</head>
414414<body><div style = "display: flex;
415415 align-items:center;height:100%; width:100%;background:#dddfd4;
416- justify-content: center;"><div style="%9:99%; aspect-ratio: %7/%8;"
416+ justify-content: center;"><div style="%9:99%; %10:99%; aspect-ratio: %7/%8;"
417417id="gd"></div></div>
418418<script>
419419
@@ -470,7 +470,7 @@ extern const char kHtmlCloudOfPoints[] = R"davis_delimeter(
470470</head>
471471<body><div style = "display: flex;
472472 align-items:center;height:100%; width:100%;background:#dddfd4;
473- justify-content: center;"><div style="%7:99%; aspect-ratio: %5/%6;"
473+ justify-content: center;"><div style="%7:99%; %8:99%; aspect-ratio: %5/%6;"
474474id="gd"></div></div>
475475<script>
476476var trace = {
@@ -1023,7 +1023,18 @@ bool createHtmlPageWithPlotlyJS(const std::vector<std::vector<double>>& values,
10231023 } else {
10241024 paramWH = " height" ;
10251025 }
1026+ string paramWHsecond;
1027+ if (configuration.heatmap .isAutoScale ) {
1028+ if (paramWH == " width" ) {
1029+ paramWHsecond = " height" ;
1030+ } else if (paramWH == " height" ) {
1031+ paramWHsecond = " width" ;
1032+ }
1033+ } else {
1034+ paramWHsecond = paramWH;
1035+ }
10261036 args[ARG_ASPECT_WIDTH_OR_HEIGHT] = paramWH;
1037+ args[ARG_ASPECT_WIDTH_OR_HEIGHT_FOR_AUTOSCALE] = paramWHsecond;
10271038 break ;
10281039 }
10291040 case dv::VISUALTYPE_SURFACE: {
@@ -1040,7 +1051,18 @@ bool createHtmlPageWithPlotlyJS(const std::vector<std::vector<double>>& values,
10401051 } else {
10411052 paramWH = " height" ;
10421053 }
1054+ string paramWHsecond;
1055+ if (configuration.surf .isAutoScale ) {
1056+ if (paramWH == " width" ) {
1057+ paramWHsecond = " height" ;
1058+ } else if (paramWH == " height" ) {
1059+ paramWHsecond = " width" ;
1060+ }
1061+ } else {
1062+ paramWHsecond = paramWH;
1063+ }
10431064 args[ARG_ASPECT_WIDTH_OR_HEIGHT] = paramWH;
1065+ args[ARG_ASPECT_WIDTH_OR_HEIGHT_FOR_AUTOSCALE] = paramWHsecond;
10441066 break ;
10451067 }
10461068 default :
@@ -1092,7 +1114,18 @@ bool showLineChartInBrowser(const vector<double>& xValues, const vector<double>&
10921114 } else {
10931115 paramWH = " height" ;
10941116 }
1117+ string paramWHsecond;
1118+ if (configuration.chart .isAutoScale ) {
1119+ if (paramWH == " width" ) {
1120+ paramWHsecond = " height" ;
1121+ } else if (paramWH == " height" ) {
1122+ paramWHsecond = " width" ;
1123+ }
1124+ } else {
1125+ paramWHsecond = paramWH;
1126+ }
10951127 args[ARG_ASPECT_WIDTH_OR_HEIGHT] = paramWH;
1128+ args[ARG_ASPECT_WIDTH_OR_HEIGHT_FOR_AUTOSCALE] = paramWHsecond;
10961129 make_string (kHtmlModel , args, page);
10971130 string pageName;
10981131 mayBeCreateJsWorkingFolder ();
@@ -1196,7 +1229,8 @@ void showMatrixSizesAreNotTheSame(int badRow) {
11961229}
11971230
11981231void showDateTimeChart (const string& date_time_values,
1199- const vector<double >& yValues) {
1232+ const vector<double >& yValues,
1233+ bool isAutoScale) {
12001234
12011235 string out;
12021236 string davis_dir;
@@ -1230,7 +1264,18 @@ void showDateTimeChart(const string& date_time_values,
12301264 }
12311265 */
12321266 string paramWH = " height" ;
1267+ string paramWHsecond;
1268+ if (isAutoScale) {
1269+ if (paramWH == " width" ) {
1270+ paramWHsecond = " height" ;
1271+ } else if (paramWH == " height" ) {
1272+ paramWHsecond = " width" ;
1273+ }
1274+ } else {
1275+ paramWHsecond = paramWH;
1276+ }
12331277 args[ARG_DATE_TIME_ASPECT_WIDTH_OR_HEIGHT] = paramWH;
1278+ args[ARG_DATE_TIME_ASPECT_WIDTH_OR_HEIGHT_FOR_AUTOSCALE] = paramWHsecond;
12341279 make_string (kHtmlDateTimeModel , args, out);
12351280 saveStringToFile (kReportPagePath , out);
12361281 openFileBySystem (kReportPagePath );
@@ -1259,7 +1304,8 @@ void addTraceBlockToGlobal(const vector<double>& xValues, const vector<double>&
12591304
12601305void showCloudOfPointsChart (const vector<double >& xValues,
12611306 const vector<double >& yValues,
1262- const vector<double >& colorValues) {
1307+ const vector<double >& colorValues,
1308+ bool isAutoScale) {
12631309 string out;
12641310 string davis_dir;
12651311#ifdef _WIN32
@@ -1283,6 +1329,17 @@ void showCloudOfPointsChart(const vector<double>& xValues,
12831329 }
12841330 */
12851331 string paramWH = " height" ;
1332+ string paramWHsecond;
1333+ if (isAutoScale) {
1334+ if (paramWH == " width" ) {
1335+ paramWHsecond = " height" ;
1336+ } else if (paramWH == " height" ) {
1337+ paramWHsecond = " width" ;
1338+ }
1339+ } else {
1340+ paramWHsecond = paramWH;
1341+ }
1342+ args[ARG_CLOUD_OF_POINTS_ASPECT_WIDTH_OR_HEIGHT_FOR_AUTOSCALE] = paramWHsecond;
12861343 args[ARG_CLOUD_OF_POINTS_ASPECT_WIDTH_OR_HEIGHT] = paramWH;
12871344 make_string (kHtmlCloudOfPoints , args, out);
12881345 saveStringToFile (kCloudPagePath , out);
@@ -1291,7 +1348,8 @@ void showCloudOfPointsChart(const vector<double>& xValues,
12911348
12921349void showCloudOfPointsChartStr (const std::string& xValues,
12931350 const vector<double >& yValues,
1294- const vector<double >& colorValues) {
1351+ const vector<double >& colorValues,
1352+ bool isAutoScale) {
12951353 string out;
12961354 string davis_dir;
12971355#ifdef _WIN32
@@ -1315,6 +1373,17 @@ void showCloudOfPointsChartStr(const std::string& xValues,
13151373 }
13161374 */
13171375 string paramWH = " height" ;
1376+ string paramWHsecond;
1377+ if (isAutoScale) {
1378+ if (paramWH == " width" ) {
1379+ paramWHsecond = " height" ;
1380+ } else if (paramWH == " height" ) {
1381+ paramWHsecond = " width" ;
1382+ }
1383+ } else {
1384+ paramWHsecond = paramWH;
1385+ }
1386+ args[ARG_CLOUD_OF_POINTS_ASPECT_WIDTH_OR_HEIGHT_FOR_AUTOSCALE] = paramWHsecond;
13181387 args[ARG_CLOUD_OF_POINTS_ASPECT_WIDTH_OR_HEIGHT] = paramWH;
13191388 make_string (kHtmlCloudOfPoints , args, out);
13201389 saveStringToFile (kCloudPagePath , out);
@@ -1363,11 +1432,21 @@ void holdOff(const Config& configuration) {
13631432 } else {
13641433 paramWH = " height" ;
13651434 }
1435+ string paramWHsecond;
1436+ if (configuration.chart .isAutoScale ) {
1437+ if (paramWH == " width" ) {
1438+ paramWHsecond = " height" ;
1439+ } else if (paramWH == " height" ) {
1440+ paramWHsecond = " width" ;
1441+ }
1442+ } else {
1443+ paramWHsecond = paramWH;
1444+ }
13661445 vector<string> args = {dvs::kPlotlyJsName , allChartBlocks_str, allTracesNames_str,
13671446 configuration.chart .title , configuration.chart .xLabel , configuration.chart .yLabel ,
13681447 dvs::toStringDotSeparator (configuration.chart .aspectRatioWidth ),
13691448 dvs::toStringDotSeparator (configuration.chart .aspectRatioHeight ),
1370- paramWH
1449+ paramWH, paramWHsecond
13711450 };
13721451 string multichartPage = dvs::kHtmlMultiChartModel ;
13731452 string filled_multichartPage = " " ;
0 commit comments