Open alanrusnak opened 10 years ago
I'm not sure your point 3 makes sense maybe you didn't finish writing it out properly? When I decided to key ticks by Timestamp, I thought that the Timestamps provided were of the simulation time, not the time the tick was executed - I thought it would be good to be able to display what time the results correspond to in "market time". It doesn't really matter what they're keyed by. With that said, Timestamp sort of intuitively makes sense if we are going to key by anything, since we are getting a new packet of data with every tick. Otherwise just a List probably makes more sense than a Map at all.
OK, fair enough. I just tested it quickly, we'll see on monday once we integrate it. It's not a big problem to modify it.
I still don't know what you're talking about! I think there are words missing from your original post, and I can't see your code to compare.
Additional thoughts from re-reading your post. What do we need JacksonDownload for? The JSON.org jar that I used to serialise objects to JSON can also deserialise, so I assume Jackson is necessary for more than just parsing JSON? You should be able to import JFreeChart by adding this dependency to the client package's pom.xml:
<dependency>
<groupId>jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.0.13</version>
</dependency>
@mildbyte can you clarify whether Maven does automatic dependency resolution? I.e. http://mvnrepository.com/artifact/jfree/jfreechart/1.0.13 suggests that jcommon is required, but do we have do add jcommon to the pom.xml too or is maven magic?
The frontend fits into the client package somewhere, although since the client is currently just a FileLoader, there's nowhere yet for it to be integrated. Some more thought is probably required here before we write too much code!
Yeah... there were bits missing in the original between angle brackets <>. I changed it now to (). It was just an idea, we can stick to Timestamp. I used Jackson only for parsing e.g.:
TreeMap<String, Integer> map = new TreeMap<String, Integer>();
ObjectMapper mapper = new ObjectMapper();
try {
map = mapper.readValue(jsonData.toString(),
new TypeReference<TreeMap<String, Integer>>() {
});
} catch (IOException e) {
e.printStackTrace();
}
I will have a look at JSON.org
Thanks for clarifying
Hey guys,
@Hephistocles Yeah, seems like Maven does resolve transitive dependencies too: https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Transitive_Dependencies. If I add your XML to a pom.xml and do dependency: resolve, it also seems to fetch jfree.jcommon.
Hey, I started working on the frontend (JSON -> Graph). JFreeChart is a good library, easy to use.