eu.binjr.common.javafx.charts.ProfiledStackedAreaChart Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of binjr-core Show documentation
Show all versions of binjr-core Show documentation
A Time Series Data Browser
/*
* Copyright 2017-2020 Frederic Thevenet
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package eu.binjr.common.javafx.charts;
import eu.binjr.common.logging.Logger;
import eu.binjr.common.logging.Profiler;
import javafx.scene.chart.Axis;
import javafx.scene.chart.StackedAreaChart;
/**
* A {@link StackedAreaChart} that logs the execution time of the {@code layoutPlotChildren} method
*
* @author Frederic Thevenet
*/
public class ProfiledStackedAreaChart extends StackedAreaChart {
private static final Logger logger = Logger.create(ProfiledStackedAreaChart.class);
/**
* Initializes a new instance of the {@link ProfiledStackedAreaChart} class
*
* @param xAxis the x axis of the chart
* @param yAxis the y axis of the chart
*/
public ProfiledStackedAreaChart(Axis xAxis, Axis yAxis) {
super(xAxis, yAxis);
}
@Override
protected void layoutPlotChildren() {
try (Profiler p = Profiler.start("Plotting MyStackedAreaChart " + this.getTitle(), logger::perf)) {
super.layoutPlotChildren();
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy