4242</head>
4343<body><div style = "display: flex;
4444 align-items:center;height:100%; width:100%;background:#dddfd4;
45- justify-content: center;"><div style="height:95 %; aspect-ratio: 1/1 ;"
45+ justify-content: center;"><div style="%11: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="height:95 %; aspect-ratio: 1/1 ;"
371+ justify-content: center;"><div style="%6: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="height:95 %; aspect-ratio: 1/1 ;"
416+ justify-content: center;"><div style="%9: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="height:95 %; aspect-ratio: 1/1 ;"
473+ justify-content: center;"><div style="%7:99 %; aspect-ratio: %5/%6 ;"
474474id="gd"></div></div>
475475<script>
476476var trace = {
@@ -1010,24 +1010,39 @@ bool createHtmlPageWithPlotlyJS(const std::vector<std::vector<double>>& values,
10101010 break ;
10111011 }
10121012 switch (typeVisual) {
1013- case dv::VISUALTYPE_HEATMAP:
1013+ case dv::VISUALTYPE_HEATMAP: {
10141014 args[ARG_MATRIX_TYPE] = kHeatMapTypePart ;
10151015 args[ARG_TITLE] = configuration.heatmap .title ;
10161016 args[ARG_TITLE_X] = configuration.heatmap .xLabel ;
10171017 args[ARG_TITLE_Y] = configuration.heatmap .yLabel ;
1018+ args[ARG_ASPECT_RATIO_WIDTH] = dvs::toStringDotSeparator (configuration.heatmap .aspectRatioWidth );
1019+ args[ARG_ASPECT_RATIO_HEIGHT] = dvs::toStringDotSeparator (configuration.heatmap .aspectRatioHeight );
1020+ string paramWH;
1021+ if (configuration.heatmap .aspectRatioWidth > configuration.heatmap .aspectRatioHeight ) {
1022+ paramWH = " width" ;
1023+ } else {
1024+ paramWH = " height" ;
1025+ }
1026+ args[ARG_ASPECT_WIDTH_OR_HEIGHT] = paramWH;
10181027 break ;
1019- case dv::VISUALTYPE_SURFACE:
1028+ }
1029+ case dv::VISUALTYPE_SURFACE: {
10201030 args[ARG_MATRIX_TYPE] = kSurfaceTypePart ;
10211031 args[ARG_TITLE] = configuration.surf .title ;
10221032 args[ARG_TITLE_X] = configuration.surf .xLabel ;
10231033 args[ARG_TITLE_Y] = configuration.surf .yLabel ;
10241034 args[ARG_TITLE_Z] = configuration.surf .zLabel ;
1035+ args[ARG_ASPECT_RATIO_WIDTH] = dvs::toStringDotSeparator (configuration.surf .aspectRatioWidth );
1036+ args[ARG_ASPECT_RATIO_HEIGHT] = dvs::toStringDotSeparator (configuration.surf .aspectRatioHeight );
1037+ string paramWH;
1038+ if (configuration.surf .aspectRatioWidth > configuration.surf .aspectRatioHeight ) {
1039+ paramWH = " width" ;
1040+ } else {
1041+ paramWH = " height" ;
1042+ }
1043+ args[ARG_ASPECT_WIDTH_OR_HEIGHT] = paramWH;
10251044 break ;
1026- case dv::VISUALTYPE_CHART:
1027- args[ARG_TITLE] = configuration.chart .title ;
1028- args[ARG_TITLE_X] = configuration.chart .xLabel ;
1029- args[ARG_TITLE_Y] = configuration.chart .yLabel ;
1030- break ;
1045+ }
10311046 default :
10321047 break ;
10331048 }
@@ -1069,6 +1084,15 @@ bool showLineChartInBrowser(const vector<double>& xValues, const vector<double>&
10691084 args[ARG_TITLE] = configuration.chart .title ;
10701085 args[ARG_TITLE_X] = configuration.chart .xLabel ;
10711086 args[ARG_TITLE_Y] = configuration.chart .yLabel ;
1087+ args[ARG_ASPECT_RATIO_WIDTH] = dvs::toStringDotSeparator (configuration.chart .aspectRatioWidth );
1088+ args[ARG_ASPECT_RATIO_HEIGHT] = dvs::toStringDotSeparator (configuration.chart .aspectRatioHeight );
1089+ string paramWH;
1090+ if (configuration.chart .aspectRatioWidth > configuration.chart .aspectRatioHeight ) {
1091+ paramWH = " width" ;
1092+ } else {
1093+ paramWH = " height" ;
1094+ }
1095+ args[ARG_ASPECT_WIDTH_OR_HEIGHT] = paramWH;
10721096 make_string (kHtmlModel , args, page);
10731097 string pageName;
10741098 mayBeCreateJsWorkingFolder ();
@@ -1195,6 +1219,18 @@ void showDateTimeChart(const string& date_time_values,
11951219 }
11961220
11971221 args[ARG_Y_DATE_TIME_VALUES] = values;
1222+ args[ARG_DATE_TIME_ASPECT_RATIO_WIDTH] = " 1" ;
1223+ args[ARG_DATE_TIME_ASPECT_RATIO_HEIGHT] = " 1" ;
1224+ /*
1225+ string paramWH;
1226+ if(configuration.chart.aspectRatioWidth > configuration.chart.aspectRatioHeight){
1227+ paramWH = "width";
1228+ }else{
1229+ paramWH = "height";
1230+ }
1231+ */
1232+ string paramWH = " height" ;
1233+ args[ARG_DATE_TIME_ASPECT_WIDTH_OR_HEIGHT] = paramWH;
11981234 make_string (kHtmlDateTimeModel , args, out);
11991235 saveStringToFile (kReportPagePath , out);
12001236 openFileBySystem (kReportPagePath );
@@ -1236,6 +1272,18 @@ void showCloudOfPointsChart(const vector<double>& xValues,
12361272 args[ARG_X_CLOUD_OF_POINTS] = vectorToString (xValues);
12371273 args[ARG_Y_CLOUD_OF_POINTS] = vectorToString (yValues);
12381274 args[ARG_COLOR_CLOUD_OF_POINTS] = vectorToString (colorValues);
1275+ args[ARG_CLOUD_OF_POINTS_ASPECT_RATIO_WIDTH] = " 1" ;
1276+ args[ARG_CLOUD_OF_POINTS_ASPECT_RATIO_HEIGHT] = " 1" ;
1277+ /*
1278+ string paramWH;
1279+ if(configuration.chart.aspectRatioWidth > configuration.chart.aspectRatioHeight){
1280+ paramWH = "width";
1281+ }else{
1282+ paramWH = "height";
1283+ }
1284+ */
1285+ string paramWH = " height" ;
1286+ args[ARG_CLOUD_OF_POINTS_ASPECT_WIDTH_OR_HEIGHT] = paramWH;
12391287 make_string (kHtmlCloudOfPoints , args, out);
12401288 saveStringToFile (kCloudPagePath , out);
12411289 openFileBySystem (kCloudPagePath );
@@ -1256,6 +1304,18 @@ void showCloudOfPointsChartStr(const std::string& xValues,
12561304 args[ARG_X_CLOUD_OF_POINTS] = xValues;
12571305 args[ARG_Y_CLOUD_OF_POINTS] = vectorToString (yValues);
12581306 args[ARG_COLOR_CLOUD_OF_POINTS] = vectorToString (colorValues);
1307+ args[ARG_CLOUD_OF_POINTS_ASPECT_RATIO_WIDTH] = " 1" ;
1308+ args[ARG_CLOUD_OF_POINTS_ASPECT_RATIO_HEIGHT] = " 1" ;
1309+ /*
1310+ string paramWH;
1311+ if(configuration.chart.aspectRatioWidth > configuration.chart.aspectRatioHeight){
1312+ paramWH = "width";
1313+ }else{
1314+ paramWH = "height";
1315+ }
1316+ */
1317+ string paramWH = " height" ;
1318+ args[ARG_CLOUD_OF_POINTS_ASPECT_WIDTH_OR_HEIGHT] = paramWH;
12591319 make_string (kHtmlCloudOfPoints , args, out);
12601320 saveStringToFile (kCloudPagePath , out);
12611321 openFileBySystem (kCloudPagePath );
@@ -1297,8 +1357,17 @@ void holdOff(const Config& configuration) {
12971357 allTracesNames_str.append (filled_trace_name_part);
12981358 allChartBlocks_str.append (dvs::allChartBlocks[i]);
12991359 }
1360+ string paramWH;
1361+ if (configuration.chart .aspectRatioWidth > configuration.chart .aspectRatioHeight ) {
1362+ paramWH = " width" ;
1363+ } else {
1364+ paramWH = " height" ;
1365+ }
13001366 vector<string> args = {dvs::kPlotlyJsName , allChartBlocks_str, allTracesNames_str,
1301- configuration.chart .title , configuration.chart .xLabel , configuration.chart .yLabel
1367+ configuration.chart .title , configuration.chart .xLabel , configuration.chart .yLabel ,
1368+ dvs::toStringDotSeparator (configuration.chart .aspectRatioWidth ),
1369+ dvs::toStringDotSeparator (configuration.chart .aspectRatioHeight ),
1370+ paramWH
13021371 };
13031372 string multichartPage = dvs::kHtmlMultiChartModel ;
13041373 string filled_multichartPage = " " ;
0 commit comments