--- In [email protected], Blair Cox <[EMAIL PROTECTED]> wrote: > > Okay, try this scenario: > > Can you change the dataprovider of a series or chart on demand from within > the program while it is running? So no matter why I¹m doing it, I have say > four completely different dataproviders collecting data from say a static > in-line source, a static XML file source and a couple dynamically generated > by whatever means. > > Then do this, have four primary combobox¹s each related to a series in the > chart. These first combobox¹s will select the dataProvider of each series > (this works when statically set). Then you have an additional four comboboxs > which will set the yAxis of each chart series based on the selected > dataProvider (conditional combobox which changes based on what the first > combobox has been set to). > > See what you have now? The ability to analyze different data sets from > different sources within the same chart. The way it works now, the > assumption is that this data can always be lumped into a single array, which > isn¹t always the case especially when dealing with an application designed > for an engineering application. It would just be far simpler to be able to > change dataprovider on the fly and tell the chart to update or reload. > > So how could this be done? Reload or recreate the chart based on a click or > change event?
You may want to consider an approach similar to this: http://blog.tsclausing.com/post/19 I actually use filters and data functions on my axes/series to change the way the data appears, instead of changing out the separate data source. If you contact me off list (amy at magnoliamultimedia dot com), I can send you some code that shows this. But I don't have time to strip it of the client-specific stuff to make it a public example, so I'm not going to post it. HTH; Amy

