Yes, the user data that can be maintained on a point object is currently restricted to JSON data so that it can be easily passed into the Highcharts API via the JSON serialization process that is used for the rest of the configuration options. So, if you have data in a DTO you'll need to either write a Java method to convert the DTO to a JSONObject value. E.g., something like:
private JSONObject convertToJSON(MyDTO myDTO) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("firstName", new JSONString(myDTO.getFirstName()));
jsonObject.put("lastName", new JSONString(myDTO.getLastName()));
return jsonObject;
}
Or, you could consider storing the DTO's in a java.util.Map within your GWT code (keyed off of the primary key of the DTO), store just the key of the DTO in the Point's user data, and then when you receive a point event you could lookup the correct DTO instance in the map passed on the key stored in the Point's user data.
Just let us know if one of those ideas isn't sufficient for what you're trying to accomplish though.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, the user data that can be maintained on a point object is currently restricted to JSON data so that it can be easily passed into the Highcharts API via the JSON serialization process that is used for the rest of the configuration options. So, if you have data in a DTO you'll need to either write a Java method to convert the DTO to a JSONObject value. E.g., something like:
Or, you could consider storing the DTO's in a java.util.Map within your GWT code (keyed off of the primary key of the DTO), store just the key of the DTO in the Point's user data, and then when you receive a point event you could lookup the correct DTO instance in the map passed on the key stored in the Point's user data.
Just let us know if one of those ideas isn't sufficient for what you're trying to accomplish though.