Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net
 Real-Time Graphics Tools for .Net (VB and C#)
 Legend on Scroll Application 1
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jerryc

USA
1 Posts

Posted - 27 Jul 2012 :  10:50:30  Show Profile  Reply with Quote
Can you tell me how to turn on the Legend for your example "ScrollApplication1'?

quinncurtis

1586 Posts

Posted - 27 Jul 2012 :  12:48:31  Show Profile  Reply with Quote
There is no simple toggle to turn on a legend. Legends must be built using the StandardLegend class. Use of that class is described in the QCChart2D Charting manual. All of the examples using it are found in the Quinn-Curtis\DotNet\QCChart2D\Visual CSharp\Examples folder (or Quinn-Curtis\DotNet\QCChart2D\Visual Basic\Examples for VB). A simple example for the ScrollApplication1 program would be:

// Horizontal Legend at bottom

Font legendFont = new Font("SansSerif", 12, FontStyle.Bold);
ChartAttribute legendAttributes = new ChartAttribute(Color.Black, 1, 0);
legendAttributes.SetLineFlag(false);
StandardLegend legend = new StandardLegend(0.1, 0.95, 0.7, 0.3, legendAttributes, StandardLegend.HORIZ_DIR);
legend.AddLegendItem("Temp 1", ChartObj.LINE, lineplot1, legendFont);
legend.AddLegendItem("Temp 2", ChartObj.LINE, lineplot2, legendFont);
chartVu.AddChartObject(legend);


or

// Vertical Legend in upper right
Font legendFont = new Font("SansSerif", 12, FontStyle.Bold);
ChartAttribute legendAttributes = new ChartAttribute(Color.Black, 1, 0);
legendAttributes.SetLineFlag(false);
StandardLegend legend = new StandardLegend(0.8, 0.15, 0.3, 0.3, legendAttributes, StandardLegend.VERT_DIR);
legend.AddLegendItem("Temp 1", ChartObj.LINE, lineplot1, legendFont);
legend.AddLegendItem("Temp 2", ChartObj.LINE, lineplot2, legendFont);
chartVu.AddChartObject(legend);
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07