Software FX Posted August 25, 2004 Report Share Posted August 25, 2004 We do not expose a Reset method, but you can use the following approach // ... Customize your default chart here MemoryStream memStream = new MemoryStream(); chart1.Export(FileFormat.Binary,memStream); // To reset the chart simply do memStream.Position = 0; chart1.Import(FileFormat.Binary,memStream); Note that this allows you to specifically define the chart state you want to use as default or have more than 1 predefined state. -- Regards, JC Software FX Support "Rob" <spam@spam.com> wrote in message news:pqa4lIsiEHA.3888@webserver3.softwarefx.com... > What's the best way of restoring the control to it's default state? > > I thought calling chart.ClearData(ClearDataFlag.AllData) would do the > trick, > but it seems that many things are not reset. > > Some of the properties that remain after calling ClearData are > - chart.PointLabelAlign > - chart.PointLabelFont > - chart.PointLabelColor > - chart.AxisX.Step and chart.AxisY.Step > > I guess I could destroy & recreate the control, but I'd rather not =) > > cheers! > Rob > > Link to comment Share on other sites More sharing options...
User (Legacy) Posted August 26, 2004 Author Report Share Posted August 26, 2004 What's the best way of restoring the control to it's default state? I thought calling chart.ClearData(ClearDataFlag.AllData) would do the trick, but it seems that many things are not reset. Some of the properties that remain after calling ClearData are - chart.PointLabelAlign - chart.PointLabelFont - chart.PointLabelColor - chart.AxisX.Step and chart.AxisY.Step I guess I could destroy & recreate the control, but I'd rather not =) cheers! Rob Link to comment Share on other sites More sharing options...
User (Legacy) Posted August 27, 2004 Author Report Share Posted August 27, 2004 lovely, thanks R "Software FX Support" <noreply> wrote in message news:MSbH8GviEHA.3152@webserver3.softwarefx.com... > We do not expose a Reset method, but you can use the following approach > > // ... Customize your default chart here > MemoryStream memStream = new MemoryStream(); > chart1.Export(FileFormat.Binary,memStream); > > // To reset the chart simply do > memStream.Position = 0; > chart1.Import(FileFormat.Binary,memStream); > > Note that this allows you to specifically define the chart state you want to > use as default or have more than 1 predefined state. > > -- > Regards, > > JC > Software FX Support > "Rob" <spam@spam.com> wrote in message > news:pqa4lIsiEHA.3888@webserver3.softwarefx.com... > > What's the best way of restoring the control to it's default state? > > > > I thought calling chart.ClearData(ClearDataFlag.AllData) would do the > > trick, > > but it seems that many things are not reset. > > > > Some of the properties that remain after calling ClearData are > > - chart.PointLabelAlign > > - chart.PointLabelFont > > - chart.PointLabelColor > > - chart.AxisX.Step and chart.AxisY.Step > > > > I guess I could destroy & recreate the control, but I'd rather not =) > > > > cheers! > > Rob > > > > > > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.