Page 1 of 1
Thumbnail of TChart
Posted: Thu Mar 17, 2016 12:06 pm
by 13049883
Hi, I am wondering whether TChart has a feature to display a thumbnail (small copy) of the main (large) chart? The small one should reflect the changes of the large one.
Thanks.
Re: Thumbnail of TChart
Posted: Fri Mar 18, 2016 10:02 am
by Christopher
icecream wrote:Hi, I am wondering whether TChart has a feature to display a thumbnail (small copy) of the main (large) chart? The small one should reflect the changes of the large one.
Thanks.
In which environment are you working? Windows forms, WPF, ASP.NET?
Re: Thumbnail of TChart
Posted: Fri Mar 18, 2016 10:06 am
by 13049883
Win forms. TeeChart v3.5.
Re: Thumbnail of TChart
Posted: Fri Mar 18, 2016 12:33 pm
by Christopher
icecream wrote:Win forms. TeeChart v3.5.
You could try something like this:
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Series.Add(typeof(Bar)).FillSampleValues();
}
private void button4_Click(object sender, EventArgs e)
{
Form thumbForm = new Form();
thumbForm.Size = new Size(200, 200);
thumbForm.Show(this);
TChart thumbChart = new TChart();
thumbChart.Dock = DockStyle.Fill;
thumbForm.Controls.Add(thumbChart);
MemoryStream stream = new MemoryStream();
tChart1.Export.Template.Save(stream);
stream.Position = 0;
thumbChart.Import.Template.Load(stream);
}