The chart implementation is a namespace inside the Stock Analyst 2 project as it's not going to be reused but it's big enough to have its own namespace.

There are four main areas on the Chart subsystem:

  • The toolbar: the toolbar allows the user to select which data has to be displayed.
  • The viewer: shows the selected data as it has been configured.
  • The generator and the model: contains all the infrastructure needed to generate the charts.
  • The options: allow to configure which data is going to be generated / viewer and how it will look like.


  • ChartToolBarVM: to separate the functionality of the toolbar related with the chart a new viewmodel has been created. It will contain all the properties and commands of the chart toolbar as these commands are not reused from the menus (so they don't need to be on the ApplicationCommandsVM class). 
  • QuotationSourceFinder: the responsibility of this class is to obtain the Quoration collection to be used on the charts. The source will be always a readwritelockedobservablecollection of quotations taken from the realtime groups or generated from the database data.


Generators and model

  • Series: represents a series to be drawn on a chart.
  • SeriesVisualOptions: represents the options that configure how the series will be displayed on the chart.
  • SeriesGenerationOptions: contains the options that set if the series is going to be generated or not, its source and the generator parameters. As the generators can have a different number of parameters this options will have room for all of them, ignoring the unneeded ones. There is a related question here: 
  • GeneratorController: this class is in charge of the management of the generators deciding when they have to be restarted when some configuration changes.


The user will be able to configure how the Chart works as it has to be flexible enough to adapt to different needs. The configuration will be done from the following dialog:

  • ChartViewerVM: 
  • ChartGenerator:
  • ChartData: the model of the chart. The data of charts are simple observable collections of points (X,Y) that we will call series. These points are user latter by the ChartViewerVM to paint the charts. There are to collections of collections that store the dated series and the value series. 

Last edited Feb 18, 2013 at 8:49 AM by somos, version 12


No comments yet.