fix axis labels when x2 axis is used
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<mat-label>Y{{yIndex}}-Axis:</mat-label>
|
<mat-label>Y{{yIndex}}-Axis Scale:</mat-label>
|
||||||
<mat-select [(value)]="yAxisScale">
|
<mat-select [(value)]="yAxisScale">
|
||||||
<mat-option value="LOG10">Logarithm</mat-option>
|
<mat-option value="LOG10">Logarithm</mat-option>
|
||||||
<mat-option value="LINEAR">Linear</mat-option>
|
<mat-option value="LINEAR">Linear</mat-option>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
|
|
||||||
<mat-form-field class="pdb-form-mid">
|
<mat-form-field class="pdb-form-mid">
|
||||||
<mat-label>Y{{yIndex}}-Axis Range:</mat-label>
|
<mat-label>Y{{yIndex}}-Axis Unit:</mat-label>
|
||||||
<mat-select [(value)]="yAxisUnit">
|
<mat-select [(value)]="yAxisUnit">
|
||||||
<mat-optgroup label="⸺numbers⸺">
|
<mat-optgroup label="⸺numbers⸺">
|
||||||
<mat-option value="AUTOMATIC_NUMBER">auto (number)</mat-option>
|
<mat-option value="AUTOMATIC_NUMBER">auto (number)</mat-option>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import java.util.Locale;
|
|||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import org.lucares.recommind.logs.AxisSettings;
|
import org.lucares.recommind.logs.AxisSettings;
|
||||||
|
import org.lucares.recommind.logs.AxisTime;
|
||||||
import org.lucares.recommind.logs.DataSeries;
|
import org.lucares.recommind.logs.DataSeries;
|
||||||
import org.lucares.recommind.logs.GnuplotAxis;
|
import org.lucares.recommind.logs.GnuplotAxis;
|
||||||
import org.lucares.recommind.logs.GnuplotLineType;
|
import org.lucares.recommind.logs.GnuplotLineType;
|
||||||
@@ -42,7 +43,7 @@ public class BarChartHandler extends AggregateHandler {
|
|||||||
result.setLabel("Bar");
|
result.setLabel("Bar");
|
||||||
result.setType(Type.Group);
|
result.setType(Type.Group);
|
||||||
result.setAxis(getxAxis());
|
result.setAxis(getxAxis());
|
||||||
result.setTicsEnabled(true);
|
result.setTicsEnabled(false);
|
||||||
result.setFrom("0");
|
result.setFrom("0");
|
||||||
result.setTo(String.valueOf(dataSeries.size()));
|
result.setTo(String.valueOf(dataSeries.size()));
|
||||||
|
|
||||||
@@ -59,15 +60,7 @@ public class BarChartHandler extends AggregateHandler {
|
|||||||
@Override
|
@Override
|
||||||
AxisSettings createYAxisSettings(final GnuplotSettings settings, final Collection<DataSeries> dataSeries) {
|
AxisSettings createYAxisSettings(final GnuplotSettings settings, final Collection<DataSeries> dataSeries) {
|
||||||
|
|
||||||
final GnuplotAxis yAxis = getyAxis();
|
final AxisSettings result = AxisTime.createYAxis(settings, getyAxis(), dataSeries);
|
||||||
|
|
||||||
final AxisSettings result = new AxisSettings();
|
|
||||||
result.setLabel("Count");
|
|
||||||
result.setType(Type.Number);
|
|
||||||
result.setAxis(yAxis);
|
|
||||||
result.setTicsEnabled(true);
|
|
||||||
result.setFrom("0");
|
|
||||||
result.setLogscale(settings.getYAxisDefinition(yAxis).isLogscale());
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,7 +75,8 @@ public class BarChartHandler extends AggregateHandler {
|
|||||||
appendln(result, "EOD");
|
appendln(result, "EOD");
|
||||||
|
|
||||||
if (settings.isRenderLabels()) {
|
if (settings.isRenderLabels()) {
|
||||||
appendfln(result, "set label at %f, %d '%s' center front offset 0,0.3", // front
|
appendfln(result, "set label at %s %f, %d '%s' center front offset 0,0.3", // front
|
||||||
|
getxAxis() == GnuplotAxis.X1 ? "first" : "second", //
|
||||||
barAggregator.getIndex() + 0.5, //
|
barAggregator.getIndex() + 0.5, //
|
||||||
barAggregator.getCount(), //
|
barAggregator.getCount(), //
|
||||||
String.format(Locale.US, "%,d", barAggregator.getCount()));
|
String.format(Locale.US, "%,d", barAggregator.getCount()));
|
||||||
@@ -101,8 +95,17 @@ public class BarChartHandler extends AggregateHandler {
|
|||||||
* aggregatedData.getDataFile(), // GnuplotLineType.Bar, // gnuplotXYAxis(), //
|
* aggregatedData.getDataFile(), // GnuplotLineType.Bar, // gnuplotXYAxis(), //
|
||||||
* lineStyle// );
|
* lineStyle// );
|
||||||
*/
|
*/
|
||||||
return formatln("'%s' using 1:3:xtic(2) %s with %s axes %s fs solid %s, \\", //
|
// return formatln("'%s' using 1:3:xtic(2) %s with %s axes %s fs solid %s, \\", //
|
||||||
|
// barAggregator.getDataName(), //
|
||||||
|
// gnuplotTitle(title), //
|
||||||
|
// GnuplotLineType.Bar, //
|
||||||
|
// gnuplotXYAxis(), //
|
||||||
|
// lineStyle.asGnuplotLineStyleBright()//
|
||||||
|
// );
|
||||||
|
|
||||||
|
return formatln("'%s' using 1:3:%stic(2) %s with %s axes %s fs solid %s, \\", //
|
||||||
barAggregator.getDataName(), //
|
barAggregator.getDataName(), //
|
||||||
|
getxAxis(), //
|
||||||
gnuplotTitle(title), //
|
gnuplotTitle(title), //
|
||||||
GnuplotLineType.Bar, //
|
GnuplotLineType.Bar, //
|
||||||
gnuplotXYAxis(), //
|
gnuplotXYAxis(), //
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import java.util.Collection;
|
|||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
import org.lucares.recommind.logs.AxisSettings;
|
import org.lucares.recommind.logs.AxisSettings;
|
||||||
|
import org.lucares.recommind.logs.AxisTime;
|
||||||
import org.lucares.recommind.logs.DataSeries;
|
import org.lucares.recommind.logs.DataSeries;
|
||||||
import org.lucares.recommind.logs.GnuplotAxis;
|
import org.lucares.recommind.logs.GnuplotAxis;
|
||||||
import org.lucares.recommind.logs.GnuplotSettings;
|
import org.lucares.recommind.logs.GnuplotSettings;
|
||||||
@@ -44,13 +45,17 @@ public class HistogramHandler extends AggregateHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
AxisSettings createYAxisSettings(final GnuplotSettings settings, final Collection<DataSeries> dataSeries) {
|
AxisSettings createYAxisSettings(final GnuplotSettings settings, final Collection<DataSeries> dataSeries) {
|
||||||
final AxisSettings result = new AxisSettings();
|
final AxisSettings result = AxisTime.createYAxis(settings, getyAxis(), dataSeries);
|
||||||
result.setLabel("Histogram - Count");
|
result.setLabel("Histogram - Count");
|
||||||
result.setType(Type.HistogramCount);
|
|
||||||
result.setAxis(getyAxis());
|
|
||||||
result.setTicsEnabled(true);
|
|
||||||
result.setFrom("0");
|
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
// final AxisSettings result = new AxisSettings();
|
||||||
|
// result.setLabel("Histogram - Count");
|
||||||
|
// result.setType(Type.HistogramCount);
|
||||||
|
// result.setAxis(getyAxis());
|
||||||
|
// result.setTicsEnabled(true);
|
||||||
|
// result.setFrom("0");
|
||||||
|
// return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -34,22 +34,6 @@ public class ParallelRequestsAggregate extends AggregateHandler {
|
|||||||
|
|
||||||
final AxisSettings result = AxisTime.createYAxis(settings, getyAxis(), dataSeries);
|
final AxisSettings result = AxisTime.createYAxis(settings, getyAxis(), dataSeries);
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
// final YAxisDefinition yAxisDefinition = settings.getYAxisDefinition(getyAxis());
|
|
||||||
//
|
|
||||||
// final AxisSettings result = new AxisSettings();
|
|
||||||
// result.setLabel("Parallel Requests");
|
|
||||||
// result.setType(Type.Number);
|
|
||||||
// result.setAxis(getyAxis());
|
|
||||||
// result.setTicsEnabled(true);
|
|
||||||
// if (yAxisDefinition.hasRange()) {
|
|
||||||
// result.setFrom(String.valueOf(yAxisDefinition.getRangeMinForUnit()));
|
|
||||||
// result.setTo(String.valueOf(yAxisDefinition.getRangeMaxForUnit()));
|
|
||||||
// } else {
|
|
||||||
// result.setFrom("0");
|
|
||||||
// }
|
|
||||||
// result.setLogscale(yAxisDefinition.isLogscale());
|
|
||||||
// return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ public class AxisSettings {
|
|||||||
|
|
||||||
private String label = "";
|
private String label = "";
|
||||||
|
|
||||||
private int rotateLabel = 0;
|
private int rotateLabel = 0; // TODO remove rotate label
|
||||||
|
|
||||||
private String from;
|
private String from;
|
||||||
private String to;
|
private String to;
|
||||||
|
|||||||
Reference in New Issue
Block a user