fair-acc / chart-fx

A scientific charting library focused on performance optimised real-time data visualisation at 25 Hz update rates for data sets with a few 10 thousand up to 5 million data points.
GNU Lesser General Public License v3.0
504 stars 93 forks source link

added parameters for styling line cap and join #626

Closed ennerf closed 1 year ago

ennerf commented 1 year ago

See https://github.com/fair-acc/chart-fx/issues/527#issuecomment-1738923062 for discussion.

The defaults for

public class Demo extends Application {
    @Override
    public void start(Stage primaryStage) throws Exception {
        XYChart chart = new XYChart();
        DefaultDataSet dataSet = new DefaultDataSet("miter demo",
                new double[]{1, 2, 3},
                new double[]{1, 2, 1},
                3,
                false);
        dataSet.setStyle("-fx-line-width: 6"); // make it more obvious

        BasicDataSetRenderer renderer = new BasicDataSetRenderer(dataSet);
        chart.getRenderers().setAll(renderer);

        chart.getXAxis().setAutoRanging(false);
        chart.getXAxis().setMin(0);
        chart.getXAxis().setMax(100);

        chart.getYAxis().setAutoRanging(false);
        chart.getYAxis().setMin(0);
        chart.getYAxis().setMax(10);

        primaryStage.setScene(new Scene(chart));
        primaryStage.show();
    }
}

now render as

image

sonarcloud[bot] commented 1 year ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell C 19 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

codecov[bot] commented 1 year ago

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (380940a) 48.08% compared to head (ab9c2dd) 48.10%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #626 +/- ## ============================================ + Coverage 48.08% 48.10% +0.02% - Complexity 6212 6219 +7 ============================================ Files 374 374 Lines 38288 38285 -3 Branches 6105 6105 ============================================ + Hits 18409 18417 +8 + Misses 18729 18721 -8 + Partials 1150 1147 -3 ``` | [Files](https://app.codecov.io/gh/fair-acc/chart-fx/pull/626?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc) | Coverage Δ | | |---|---|---| | [...acc/chartfx/renderer/spi/ErrorDataSetRenderer.java](https://app.codecov.io/gh/fair-acc/chart-fx/pull/626?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc#diff-Y2hhcnRmeC1jaGFydC9zcmMvbWFpbi9qYXZhL2lvL2ZhaXJfYWNjL2NoYXJ0ZngvcmVuZGVyZXIvc3BpL0Vycm9yRGF0YVNldFJlbmRlcmVyLmphdmE=) | `59.17% <100.00%> (-0.96%)` | :arrow_down: | | [...acc/chartfx/renderer/spi/ReducingLineRenderer.java](https://app.codecov.io/gh/fair-acc/chart-fx/pull/626?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc#diff-Y2hhcnRmeC1jaGFydC9zcmMvbWFpbi9qYXZhL2lvL2ZhaXJfYWNjL2NoYXJ0ZngvcmVuZGVyZXIvc3BpL1JlZHVjaW5nTGluZVJlbmRlcmVyLmphdmE=) | `0.00% <0.00%> (ø)` | | | [...acc/chartfx/renderer/spi/BasicDataSetRenderer.java](https://app.codecov.io/gh/fair-acc/chart-fx/pull/626?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc#diff-Y2hhcnRmeC1jaGFydC9zcmMvbWFpbi9qYXZhL2lvL2ZhaXJfYWNjL2NoYXJ0ZngvcmVuZGVyZXIvc3BpL0Jhc2ljRGF0YVNldFJlbmRlcmVyLmphdmE=) | `0.00% <0.00%> (ø)` | | | [...ir\_acc/chartfx/renderer/spi/HistogramRenderer.java](https://app.codecov.io/gh/fair-acc/chart-fx/pull/626?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc#diff-Y2hhcnRmeC1jaGFydC9zcmMvbWFpbi9qYXZhL2lvL2ZhaXJfYWNjL2NoYXJ0ZngvcmVuZGVyZXIvc3BpL0hpc3RvZ3JhbVJlbmRlcmVyLmphdmE=) | `0.00% <0.00%> (ø)` | | | [.../fair\_acc/chartfx/ui/css/DataSetNodeParameter.java](https://app.codecov.io/gh/fair-acc/chart-fx/pull/626?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc#diff-Y2hhcnRmeC1jaGFydC9zcmMvbWFpbi9qYXZhL2lvL2ZhaXJfYWNjL2NoYXJ0ZngvdWkvY3NzL0RhdGFTZXROb2RlUGFyYW1ldGVyLmphdmE=) | `52.31% <59.09%> (+1.15%)` | :arrow_up: | ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/fair-acc/chart-fx/pull/626/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=fair-acc)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.