Setting line thickness/color for XYZLineChart

A discussion forum for Orson Charts (a 3D chart library for the Java platform).
Posts: 1
Joined: Fri Aug 11, 2017 8:05 pm
antibot: No, of course not.

Setting line thickness/color for XYZLineChart

Post by cnsensa » Fri Aug 11, 2017 8:20 pm

I am trying to implement a simple application that would plot a 3-D vector. I am currently have something similar set up using the XYZ line chart as seen below:

Code: Select all

    private void initializeGraph() {
        XYZDataset dataset = createNewDataset();
        Chart3D chart = createChart(dataset);
        Chart3DPanel chartPanel = new Chart3DPanel(chart);
        graphPanel.add(new DisplayPanel3D(chartPanel), java.awt.BorderLayout.CENTER);
    private Chart3D createChart(XYZDataset dataset) {
        Chart3D chart = Chart3DFactory.createXYZLineChart(
                "XYZ Chart Test",  //Title
                "Subtitle here",  //Subtitle
                dataset,            //Dataset
                "X",  //X-axis label
                "Y",  //Y-axis label
                "Z"   //Z-axis label
        XYZPlot plot = (XYZPlot) chart.getPlot();
        plot.setDimensions(new Dimension3D(15, 10, 8));
        ((NumberAxis3D)plot.getXAxis()).setRange(0.0, 10.0);
        ((NumberAxis3D)plot.getYAxis()).setRange(0.0, 10.0);
        ((NumberAxis3D)plot.getZAxis()).setRange(0.0, 10.0);
        return chart;
    private XYZSeries<String> series1;
    private XYZDataset<String> createNewDataset() {
        series1 = new XYZSeries<>("Series 1");
        series1.add(0.0, 0.0, 0.0);
        series1.add(1.0, 5.0, 1.0);
        XYZSeriesCollection<String> dataset = new XYZSeriesCollection<>();
        return dataset;
For the most part, this works as needed but I would like to adjust the line thickness and color to improve legibility (especially if I am trying to display multiple vectors at a time) but from a quick look at the API docs, I can't seem to find the appropriate renderer for controlling this.

Thank you!

Also as a side note, is it possible to adjust the line renderer in such a way that it could display an arrow head? See image below.