User (Legacy) Posted February 3, 2006 Report Share Posted February 3, 2006 I have 4 charts on a form displaying data. There are the same number of series at any given time on each of the 4 charts. Here's what I want to do: when the user changes properties for, say, series 0 of chart2, I want to make that same change to each of the other 4 charts. I was thinking of using the Export functionality as a way to "copy" certain attributes (which I'll set using a FileMask before-hand) into the other charts. The problem is that none of the events I can find to hook into (AttributeChanging, ChangedByUser) really fire appropriately. Is there a way to do this that I haven't found yet? Also, as a side note, I'm saving off these settings (which should be universal for all four charts) to a file and reloading them when they reload the app. Thanks, --Shaun Link to comment Share on other sites More sharing options...
User (Legacy) Posted February 6, 2006 Author Report Share Posted February 6, 2006 Any thoughts on this? I tried searching for more info, but I couldn't find anyone wanting to do exactly this... Thanks again for any help! "Shaun Davidson" <shaund@csgpro.com> wrote in message news:W1v663RKGHA.2568@webserver3.softwarefx.com... >I have 4 charts on a form displaying data. There are the same number of >series at any given time on each of the 4 charts. Here's what I want to do: >when the user changes properties for, say, series 0 of chart2, I want to >make that same change to each of the other 4 charts. I was thinking of >using the Export functionality as a way to "copy" certain attributes (which >I'll set using a FileMask before-hand) into the other charts. > > The problem is that none of the events I can find to hook into > (AttributeChanging, ChangedByUser) really fire appropriately. Is there a > way to do this that I haven't found yet? > > Also, as a side note, I'm saving off these settings (which should be > universal for all four charts) to a file and reloading them when they > reload the app. > > Thanks, > > --Shaun > Link to comment Share on other sites More sharing options...
User (Legacy) Posted February 6, 2006 Author Report Share Posted February 6, 2006 Here's an update on where I'm at: I decided to use the InternalCommand event. Since this command is a "this attribute is changing" event instead of a "this attribute has been changed" type of event (at least, it seems to be working this way for line color and thickness), I just start a time and "wait" for the changes to be applied to the properties. My code for this looks something like: Private Sub Chart1_InternalCommand(ByVal sender As Object, ByVal e As CommandUIEventArgs) Handles Chart1.InternalCommand Timer1.Start() End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Dim stream As IO.Stream = New IO.MemoryStream Chart1.Export(FileFormat.Binary, stream) stream.Position = 0 Chart2.Import(FileFormat.Binary, stream) Timer1.Stop() End Sub Then, in the code that runs when the form unloads, I check to see if the Chart1.Dirty flag is set. If it is, I stuff the Binary data into an image column in the database. Do you see any problems with this approach? --Shaun Link to comment Share on other sites More sharing options...
Software FX Posted February 7, 2006 Report Share Posted February 7, 2006 Looks fine to me. As long as you set FileMask appropriately to for example not include Data. -- Francisco Padron www.chartfx.com Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.