javafx.scene.chart.PieChart.Data Java Examples

The following examples show how to use javafx.scene.chart.PieChart.Data. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProgressController.java    From VocabHunter with Apache License 2.0 6 votes vote down vote up
private void buildChartResults(final ProgressModel model) {
    Data known = slice(PROGRESS_SLICE_KNOWN, model.knownProperty());
    Data unknown = slice(PROGRESS_SLICE_UNKNOWN, model.unknownProperty());
    Data unmarked = slice(PROGRESS_SLICE_UNMARKED, model.unseenUnfilteredProperty());
    Data filtered = slice(PROGRESS_SLICE_FILTERED, model.unseenFilteredProperty());

    chartResults.setData(FXCollections.observableArrayList(
        known, unknown, unmarked, filtered
    ));

    bindValueLabel(labelValueKnown, model.knownProperty());
    bindPercentLabel(labelPercentKnown, model.knownPercentProperty());
    bindValueLabel(labelValueUnknown, model.unknownProperty());
    bindPercentLabel(labelPercentUnknown, model.unknownPercentProperty());
    bindValueLabel(labelValueUnseenUnfiltered, model.unseenUnfilteredProperty());
    bindPercentLabel(labelPercentUnseenUnfiltered, model.unseenUnfilteredPercentProperty());
    bindValueLabel(labelValueFiltered, model.unseenFilteredProperty());
    bindPercentLabel(labelPercentFiltered, model.unseenFilteredPercentProperty());
}
 
Example #2
Source File: ProgressController.java    From VocabHunter with Apache License 2.0 5 votes vote down vote up
private void buildChartProgress(final ProgressModel model) {
    Data done = slice(PROGRESS_SLICE_MARKED, model.markedProperty());
    Data remaining = slice(PROGRESS_SLICE_UNMARKED, model.unseenUnfilteredProperty());

    chartProgress.setData(FXCollections.observableArrayList(
        done, remaining
    ));

    bindValueLabel(labelValueDone, model.markedProperty());
    bindPercentLabel(labelPercentDone, model.markedPercentVisibleProperty());
    bindValueLabel(labelValueRemaining, model.unseenUnfilteredProperty());
    bindPercentLabel(labelPercentRemaining, model.unseenUnfilteredPercentVisibleProperty());
}
 
Example #3
Source File: TopBarView.java    From erlyberly with GNU General Public License v3.0 5 votes vote down vote up
private void showErlangMemory() {
    ObservableList<PieChart.Data> data = FXCollections.observableArrayList();

    showPieChart(data);

    ErlangMemoryThread emThread;
    emThread = new ErlangMemoryThread(data);
    emThread.start();
}
 
Example #4
Source File: TopBarView.java    From erlyberly with GNU General Public License v3.0 5 votes vote down vote up
private void populatePieData(final Map<Object, Object> erlangMemory) {
    for (Entry<Object, Object> entry : erlangMemory.entrySet()) {
        long kb = (long) (Double.parseDouble(entry.getValue().toString()) / 1024);
        String label = entry.getKey().toString() + " (" + kb + " KB)";
        pieData.add(new Data(label, kb));
    }
}
 
Example #5
Source File: TopBarView.java    From erlyberly with GNU General Public License v3.0 4 votes vote down vote up
public ErlangMemoryThread(ObservableList<PieChart.Data> thePieData) {
    pieData = thePieData;

    setName("Erlang Memory Thread");
    setDaemon(true);
}
 
Example #6
Source File: ProcView.java    From erlyberly with GNU General Public License v3.0 4 votes vote down vote up
@FXML
private void onHeapPie() {
    ObservableList<PieChart.Data> data = buildData(chartableProcs(), (p) -> {return p.getHeapSize(); });

    showPieChart("Process Heap", data);
}
 
Example #7
Source File: ProcView.java    From erlyberly with GNU General Public License v3.0 4 votes vote down vote up
@FXML
private void onStackPie() {
    ObservableList<PieChart.Data> data = buildData(chartableProcs(), (p) -> {return p.getStackSize(); });

    showPieChart("Process Stack", data);
}
 
Example #8
Source File: ProcView.java    From erlyberly with GNU General Public License v3.0 4 votes vote down vote up
@FXML
private void onTotalHeapPie() {
    ObservableList<PieChart.Data> data = buildData(chartableProcs(), (p) -> {return p.getTotalHeapSize(); });

    showPieChart("Total Heap", data);
}