Javafx-snapshot of scene doesnt show values and series
I made a really short app, which uses javafx to generate a chart. App shows the right values(chart) but when I do snapshot, image shows just an axis and labels, but not the series and values.
stage.setTitle("Line Chart Sample");
final DateAxis xAxis = new DateAxis();
final NumberAxis yAxis = new NumberAxis();
xAxis.setLabel("Number of Month");
yAxis.setLabel("Count");
final LineChart<Date, Number> lineChart = new LineChart<>(xAxis,yAxis);
Scene scene = new Scene(lineChart,1000,700);
lineChart.setTitle("Stock Monitoring, 2010");
XYChart.Series series = new XYChart.Series();
series.setName("My portfolio");
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 15).getTime(), 23));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 16).getTime(), 14));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 17).getTime(), 15));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 18).getTime(), 24));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 19).getTime(), 34));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 20).getTime(), 36));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 21).getTime(), 22));
lineChart.getData().add(series);
stage.setScene(scene);
stage.show();
WritableImage img = new WritableImage(1000, 700);
File file = new File("saved.png");
scene.snapshot(img);
RenderedImage renderedImage = SwingFXUtils.fromFXImage(img, null);
ImageIO.write(renderedImage,"png", file);
here is a saved file
here is a screenshot from app
I have no idea what I am doing wrong.
java javafx charts screenshot snapshot
add a comment |
I made a really short app, which uses javafx to generate a chart. App shows the right values(chart) but when I do snapshot, image shows just an axis and labels, but not the series and values.
stage.setTitle("Line Chart Sample");
final DateAxis xAxis = new DateAxis();
final NumberAxis yAxis = new NumberAxis();
xAxis.setLabel("Number of Month");
yAxis.setLabel("Count");
final LineChart<Date, Number> lineChart = new LineChart<>(xAxis,yAxis);
Scene scene = new Scene(lineChart,1000,700);
lineChart.setTitle("Stock Monitoring, 2010");
XYChart.Series series = new XYChart.Series();
series.setName("My portfolio");
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 15).getTime(), 23));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 16).getTime(), 14));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 17).getTime(), 15));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 18).getTime(), 24));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 19).getTime(), 34));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 20).getTime(), 36));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 21).getTime(), 22));
lineChart.getData().add(series);
stage.setScene(scene);
stage.show();
WritableImage img = new WritableImage(1000, 700);
File file = new File("saved.png");
scene.snapshot(img);
RenderedImage renderedImage = SwingFXUtils.fromFXImage(img, null);
ImageIO.write(renderedImage,"png", file);
here is a saved file
here is a screenshot from app
I have no idea what I am doing wrong.
java javafx charts screenshot snapshot
add a comment |
I made a really short app, which uses javafx to generate a chart. App shows the right values(chart) but when I do snapshot, image shows just an axis and labels, but not the series and values.
stage.setTitle("Line Chart Sample");
final DateAxis xAxis = new DateAxis();
final NumberAxis yAxis = new NumberAxis();
xAxis.setLabel("Number of Month");
yAxis.setLabel("Count");
final LineChart<Date, Number> lineChart = new LineChart<>(xAxis,yAxis);
Scene scene = new Scene(lineChart,1000,700);
lineChart.setTitle("Stock Monitoring, 2010");
XYChart.Series series = new XYChart.Series();
series.setName("My portfolio");
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 15).getTime(), 23));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 16).getTime(), 14));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 17).getTime(), 15));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 18).getTime(), 24));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 19).getTime(), 34));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 20).getTime(), 36));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 21).getTime(), 22));
lineChart.getData().add(series);
stage.setScene(scene);
stage.show();
WritableImage img = new WritableImage(1000, 700);
File file = new File("saved.png");
scene.snapshot(img);
RenderedImage renderedImage = SwingFXUtils.fromFXImage(img, null);
ImageIO.write(renderedImage,"png", file);
here is a saved file
here is a screenshot from app
I have no idea what I am doing wrong.
java javafx charts screenshot snapshot
I made a really short app, which uses javafx to generate a chart. App shows the right values(chart) but when I do snapshot, image shows just an axis and labels, but not the series and values.
stage.setTitle("Line Chart Sample");
final DateAxis xAxis = new DateAxis();
final NumberAxis yAxis = new NumberAxis();
xAxis.setLabel("Number of Month");
yAxis.setLabel("Count");
final LineChart<Date, Number> lineChart = new LineChart<>(xAxis,yAxis);
Scene scene = new Scene(lineChart,1000,700);
lineChart.setTitle("Stock Monitoring, 2010");
XYChart.Series series = new XYChart.Series();
series.setName("My portfolio");
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 15).getTime(), 23));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 16).getTime(), 14));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 17).getTime(), 15));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 18).getTime(), 24));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 19).getTime(), 34));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 20).getTime(), 36));
series.getData().add(new XYChart.Data(new GregorianCalendar(2012, 11, 21).getTime(), 22));
lineChart.getData().add(series);
stage.setScene(scene);
stage.show();
WritableImage img = new WritableImage(1000, 700);
File file = new File("saved.png");
scene.snapshot(img);
RenderedImage renderedImage = SwingFXUtils.fromFXImage(img, null);
ImageIO.write(renderedImage,"png", file);
here is a saved file
here is a screenshot from app
I have no idea what I am doing wrong.
java javafx charts screenshot snapshot
java javafx charts screenshot snapshot
edited Dec 21 '16 at 3:46
JSON C11
4,00844339
4,00844339
asked Feb 10 '16 at 14:30
Jiri PurJiri Pur
233
233
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
By default, charts are animated. The snapshot is happening before the (brief) animation is complete, so the data don't appear. Call
lineChart.setAnimated(false);
It is probably also sensible to force layout and application of CSS (which determines how the lines and nodes for the data are drawn). Typically these are only done on the first scene rendering, so it is possible your snapshot takes place before these happen. You need to do this by calling
lineChart.applyCss();
lineChart.layout();
after the chart has been added to a scene, and after the data have been added to the chart.
Here is an SSCCE:
import java.awt.image.RenderedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javafx.application.Application;
import javafx.embed.swing.SwingFXUtils;
import javafx.scene.Scene;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart;
import javafx.scene.image.WritableImage;
import javafx.stage.Stage;
public class SnapshotChart extends Application {
@Override
public void start(Stage stage) throws IOException {
stage.setTitle("Line Chart Sample");
final NumberAxis xAxis = new NumberAxis();
final NumberAxis yAxis = new NumberAxis();
xAxis.setLabel("Number of Month");
yAxis.setLabel("Count");
final LineChart<Number, Number> lineChart = new LineChart<>(xAxis,yAxis);
lineChart.setAnimated(false);
Scene scene = new Scene(lineChart,1000,700);
lineChart.setTitle("Stock Monitoring, 2010");
XYChart.Series<Number, Number> series = new XYChart.Series<>();
series.setName("My portfolio");
series.getData().add(new XYChart.Data<>(1, 23));
series.getData().add(new XYChart.Data<>(2, 14));
series.getData().add(new XYChart.Data<>(3, 15));
series.getData().add(new XYChart.Data<>(4, 24));
series.getData().add(new XYChart.Data<>(5, 34));
series.getData().add(new XYChart.Data<>(6, 36));
series.getData().add(new XYChart.Data<>(7, 22));
lineChart.getData().add(series);
lineChart.applyCss();
lineChart.layout();
stage.setScene(scene);
stage.show();
WritableImage img = new WritableImage(1000, 700);
File file = new File("saved.png");
scene.snapshot(img);
RenderedImage renderedImage = SwingFXUtils.fromFXImage(img, null);
ImageIO.write(renderedImage,"png", file);
}
public static void main(String args) {
launch(args);
}
}
thanks, now i see vaules but still not the series.
– Jiri Pur
Feb 10 '16 at 14:52
It works for me but I had to modify your code considerably to get a working example. (Eg what isDateAxis
?). Can you expand the code in the question into a Minimal, Complete, and Verifiable example?
– James_D
Feb 10 '16 at 14:54
ok, my apologies. DateAxis is opensource code for date axis in javafx(myjavafx.blogspot.cz/2013/09/…). But even if i tried it with Number axis i still have same results(Chart with values without series). And thats almost all , except imports and name of the class.
– Jiri Pur
Feb 10 '16 at 15:03
See update. You might needapplyCss()
andlayout()
.
– James_D
Feb 10 '16 at 15:05
Thanks, that was it
– Jiri Pur
Feb 10 '16 at 15:10
|
show 3 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f35317932%2fjavafx-snapshot-of-scene-doesnt-show-values-and-series%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
By default, charts are animated. The snapshot is happening before the (brief) animation is complete, so the data don't appear. Call
lineChart.setAnimated(false);
It is probably also sensible to force layout and application of CSS (which determines how the lines and nodes for the data are drawn). Typically these are only done on the first scene rendering, so it is possible your snapshot takes place before these happen. You need to do this by calling
lineChart.applyCss();
lineChart.layout();
after the chart has been added to a scene, and after the data have been added to the chart.
Here is an SSCCE:
import java.awt.image.RenderedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javafx.application.Application;
import javafx.embed.swing.SwingFXUtils;
import javafx.scene.Scene;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart;
import javafx.scene.image.WritableImage;
import javafx.stage.Stage;
public class SnapshotChart extends Application {
@Override
public void start(Stage stage) throws IOException {
stage.setTitle("Line Chart Sample");
final NumberAxis xAxis = new NumberAxis();
final NumberAxis yAxis = new NumberAxis();
xAxis.setLabel("Number of Month");
yAxis.setLabel("Count");
final LineChart<Number, Number> lineChart = new LineChart<>(xAxis,yAxis);
lineChart.setAnimated(false);
Scene scene = new Scene(lineChart,1000,700);
lineChart.setTitle("Stock Monitoring, 2010");
XYChart.Series<Number, Number> series = new XYChart.Series<>();
series.setName("My portfolio");
series.getData().add(new XYChart.Data<>(1, 23));
series.getData().add(new XYChart.Data<>(2, 14));
series.getData().add(new XYChart.Data<>(3, 15));
series.getData().add(new XYChart.Data<>(4, 24));
series.getData().add(new XYChart.Data<>(5, 34));
series.getData().add(new XYChart.Data<>(6, 36));
series.getData().add(new XYChart.Data<>(7, 22));
lineChart.getData().add(series);
lineChart.applyCss();
lineChart.layout();
stage.setScene(scene);
stage.show();
WritableImage img = new WritableImage(1000, 700);
File file = new File("saved.png");
scene.snapshot(img);
RenderedImage renderedImage = SwingFXUtils.fromFXImage(img, null);
ImageIO.write(renderedImage,"png", file);
}
public static void main(String args) {
launch(args);
}
}
thanks, now i see vaules but still not the series.
– Jiri Pur
Feb 10 '16 at 14:52
It works for me but I had to modify your code considerably to get a working example. (Eg what isDateAxis
?). Can you expand the code in the question into a Minimal, Complete, and Verifiable example?
– James_D
Feb 10 '16 at 14:54
ok, my apologies. DateAxis is opensource code for date axis in javafx(myjavafx.blogspot.cz/2013/09/…). But even if i tried it with Number axis i still have same results(Chart with values without series). And thats almost all , except imports and name of the class.
– Jiri Pur
Feb 10 '16 at 15:03
See update. You might needapplyCss()
andlayout()
.
– James_D
Feb 10 '16 at 15:05
Thanks, that was it
– Jiri Pur
Feb 10 '16 at 15:10
|
show 3 more comments
By default, charts are animated. The snapshot is happening before the (brief) animation is complete, so the data don't appear. Call
lineChart.setAnimated(false);
It is probably also sensible to force layout and application of CSS (which determines how the lines and nodes for the data are drawn). Typically these are only done on the first scene rendering, so it is possible your snapshot takes place before these happen. You need to do this by calling
lineChart.applyCss();
lineChart.layout();
after the chart has been added to a scene, and after the data have been added to the chart.
Here is an SSCCE:
import java.awt.image.RenderedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javafx.application.Application;
import javafx.embed.swing.SwingFXUtils;
import javafx.scene.Scene;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart;
import javafx.scene.image.WritableImage;
import javafx.stage.Stage;
public class SnapshotChart extends Application {
@Override
public void start(Stage stage) throws IOException {
stage.setTitle("Line Chart Sample");
final NumberAxis xAxis = new NumberAxis();
final NumberAxis yAxis = new NumberAxis();
xAxis.setLabel("Number of Month");
yAxis.setLabel("Count");
final LineChart<Number, Number> lineChart = new LineChart<>(xAxis,yAxis);
lineChart.setAnimated(false);
Scene scene = new Scene(lineChart,1000,700);
lineChart.setTitle("Stock Monitoring, 2010");
XYChart.Series<Number, Number> series = new XYChart.Series<>();
series.setName("My portfolio");
series.getData().add(new XYChart.Data<>(1, 23));
series.getData().add(new XYChart.Data<>(2, 14));
series.getData().add(new XYChart.Data<>(3, 15));
series.getData().add(new XYChart.Data<>(4, 24));
series.getData().add(new XYChart.Data<>(5, 34));
series.getData().add(new XYChart.Data<>(6, 36));
series.getData().add(new XYChart.Data<>(7, 22));
lineChart.getData().add(series);
lineChart.applyCss();
lineChart.layout();
stage.setScene(scene);
stage.show();
WritableImage img = new WritableImage(1000, 700);
File file = new File("saved.png");
scene.snapshot(img);
RenderedImage renderedImage = SwingFXUtils.fromFXImage(img, null);
ImageIO.write(renderedImage,"png", file);
}
public static void main(String args) {
launch(args);
}
}
thanks, now i see vaules but still not the series.
– Jiri Pur
Feb 10 '16 at 14:52
It works for me but I had to modify your code considerably to get a working example. (Eg what isDateAxis
?). Can you expand the code in the question into a Minimal, Complete, and Verifiable example?
– James_D
Feb 10 '16 at 14:54
ok, my apologies. DateAxis is opensource code for date axis in javafx(myjavafx.blogspot.cz/2013/09/…). But even if i tried it with Number axis i still have same results(Chart with values without series). And thats almost all , except imports and name of the class.
– Jiri Pur
Feb 10 '16 at 15:03
See update. You might needapplyCss()
andlayout()
.
– James_D
Feb 10 '16 at 15:05
Thanks, that was it
– Jiri Pur
Feb 10 '16 at 15:10
|
show 3 more comments
By default, charts are animated. The snapshot is happening before the (brief) animation is complete, so the data don't appear. Call
lineChart.setAnimated(false);
It is probably also sensible to force layout and application of CSS (which determines how the lines and nodes for the data are drawn). Typically these are only done on the first scene rendering, so it is possible your snapshot takes place before these happen. You need to do this by calling
lineChart.applyCss();
lineChart.layout();
after the chart has been added to a scene, and after the data have been added to the chart.
Here is an SSCCE:
import java.awt.image.RenderedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javafx.application.Application;
import javafx.embed.swing.SwingFXUtils;
import javafx.scene.Scene;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart;
import javafx.scene.image.WritableImage;
import javafx.stage.Stage;
public class SnapshotChart extends Application {
@Override
public void start(Stage stage) throws IOException {
stage.setTitle("Line Chart Sample");
final NumberAxis xAxis = new NumberAxis();
final NumberAxis yAxis = new NumberAxis();
xAxis.setLabel("Number of Month");
yAxis.setLabel("Count");
final LineChart<Number, Number> lineChart = new LineChart<>(xAxis,yAxis);
lineChart.setAnimated(false);
Scene scene = new Scene(lineChart,1000,700);
lineChart.setTitle("Stock Monitoring, 2010");
XYChart.Series<Number, Number> series = new XYChart.Series<>();
series.setName("My portfolio");
series.getData().add(new XYChart.Data<>(1, 23));
series.getData().add(new XYChart.Data<>(2, 14));
series.getData().add(new XYChart.Data<>(3, 15));
series.getData().add(new XYChart.Data<>(4, 24));
series.getData().add(new XYChart.Data<>(5, 34));
series.getData().add(new XYChart.Data<>(6, 36));
series.getData().add(new XYChart.Data<>(7, 22));
lineChart.getData().add(series);
lineChart.applyCss();
lineChart.layout();
stage.setScene(scene);
stage.show();
WritableImage img = new WritableImage(1000, 700);
File file = new File("saved.png");
scene.snapshot(img);
RenderedImage renderedImage = SwingFXUtils.fromFXImage(img, null);
ImageIO.write(renderedImage,"png", file);
}
public static void main(String args) {
launch(args);
}
}
By default, charts are animated. The snapshot is happening before the (brief) animation is complete, so the data don't appear. Call
lineChart.setAnimated(false);
It is probably also sensible to force layout and application of CSS (which determines how the lines and nodes for the data are drawn). Typically these are only done on the first scene rendering, so it is possible your snapshot takes place before these happen. You need to do this by calling
lineChart.applyCss();
lineChart.layout();
after the chart has been added to a scene, and after the data have been added to the chart.
Here is an SSCCE:
import java.awt.image.RenderedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javafx.application.Application;
import javafx.embed.swing.SwingFXUtils;
import javafx.scene.Scene;
import javafx.scene.chart.LineChart;
import javafx.scene.chart.NumberAxis;
import javafx.scene.chart.XYChart;
import javafx.scene.image.WritableImage;
import javafx.stage.Stage;
public class SnapshotChart extends Application {
@Override
public void start(Stage stage) throws IOException {
stage.setTitle("Line Chart Sample");
final NumberAxis xAxis = new NumberAxis();
final NumberAxis yAxis = new NumberAxis();
xAxis.setLabel("Number of Month");
yAxis.setLabel("Count");
final LineChart<Number, Number> lineChart = new LineChart<>(xAxis,yAxis);
lineChart.setAnimated(false);
Scene scene = new Scene(lineChart,1000,700);
lineChart.setTitle("Stock Monitoring, 2010");
XYChart.Series<Number, Number> series = new XYChart.Series<>();
series.setName("My portfolio");
series.getData().add(new XYChart.Data<>(1, 23));
series.getData().add(new XYChart.Data<>(2, 14));
series.getData().add(new XYChart.Data<>(3, 15));
series.getData().add(new XYChart.Data<>(4, 24));
series.getData().add(new XYChart.Data<>(5, 34));
series.getData().add(new XYChart.Data<>(6, 36));
series.getData().add(new XYChart.Data<>(7, 22));
lineChart.getData().add(series);
lineChart.applyCss();
lineChart.layout();
stage.setScene(scene);
stage.show();
WritableImage img = new WritableImage(1000, 700);
File file = new File("saved.png");
scene.snapshot(img);
RenderedImage renderedImage = SwingFXUtils.fromFXImage(img, null);
ImageIO.write(renderedImage,"png", file);
}
public static void main(String args) {
launch(args);
}
}
edited Feb 10 '16 at 15:04
answered Feb 10 '16 at 14:37
James_DJames_D
143k9169207
143k9169207
thanks, now i see vaules but still not the series.
– Jiri Pur
Feb 10 '16 at 14:52
It works for me but I had to modify your code considerably to get a working example. (Eg what isDateAxis
?). Can you expand the code in the question into a Minimal, Complete, and Verifiable example?
– James_D
Feb 10 '16 at 14:54
ok, my apologies. DateAxis is opensource code for date axis in javafx(myjavafx.blogspot.cz/2013/09/…). But even if i tried it with Number axis i still have same results(Chart with values without series). And thats almost all , except imports and name of the class.
– Jiri Pur
Feb 10 '16 at 15:03
See update. You might needapplyCss()
andlayout()
.
– James_D
Feb 10 '16 at 15:05
Thanks, that was it
– Jiri Pur
Feb 10 '16 at 15:10
|
show 3 more comments
thanks, now i see vaules but still not the series.
– Jiri Pur
Feb 10 '16 at 14:52
It works for me but I had to modify your code considerably to get a working example. (Eg what isDateAxis
?). Can you expand the code in the question into a Minimal, Complete, and Verifiable example?
– James_D
Feb 10 '16 at 14:54
ok, my apologies. DateAxis is opensource code for date axis in javafx(myjavafx.blogspot.cz/2013/09/…). But even if i tried it with Number axis i still have same results(Chart with values without series). And thats almost all , except imports and name of the class.
– Jiri Pur
Feb 10 '16 at 15:03
See update. You might needapplyCss()
andlayout()
.
– James_D
Feb 10 '16 at 15:05
Thanks, that was it
– Jiri Pur
Feb 10 '16 at 15:10
thanks, now i see vaules but still not the series.
– Jiri Pur
Feb 10 '16 at 14:52
thanks, now i see vaules but still not the series.
– Jiri Pur
Feb 10 '16 at 14:52
It works for me but I had to modify your code considerably to get a working example. (Eg what is
DateAxis
?). Can you expand the code in the question into a Minimal, Complete, and Verifiable example?– James_D
Feb 10 '16 at 14:54
It works for me but I had to modify your code considerably to get a working example. (Eg what is
DateAxis
?). Can you expand the code in the question into a Minimal, Complete, and Verifiable example?– James_D
Feb 10 '16 at 14:54
ok, my apologies. DateAxis is opensource code for date axis in javafx(myjavafx.blogspot.cz/2013/09/…). But even if i tried it with Number axis i still have same results(Chart with values without series). And thats almost all , except imports and name of the class.
– Jiri Pur
Feb 10 '16 at 15:03
ok, my apologies. DateAxis is opensource code for date axis in javafx(myjavafx.blogspot.cz/2013/09/…). But even if i tried it with Number axis i still have same results(Chart with values without series). And thats almost all , except imports and name of the class.
– Jiri Pur
Feb 10 '16 at 15:03
See update. You might need
applyCss()
and layout()
.– James_D
Feb 10 '16 at 15:05
See update. You might need
applyCss()
and layout()
.– James_D
Feb 10 '16 at 15:05
Thanks, that was it
– Jiri Pur
Feb 10 '16 at 15:10
Thanks, that was it
– Jiri Pur
Feb 10 '16 at 15:10
|
show 3 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f35317932%2fjavafx-snapshot-of-scene-doesnt-show-values-and-series%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown