Preserving Font Label Sizes...

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
2DScatterPlot
Newbie
Newbie
Posts: 5
Joined: Thu Sep 23, 2004 4:00 am
Location: Australia

Preserving Font Label Sizes...

Post by 2DScatterPlot » Thu Apr 07, 2005 1:35 am

Hi Forum,

I'll try to be as succinct as possible to describe this issue. Development
Environment WindowsXP SP2, C# 2003 (.NET Framework 1.1), MS Jet40 (MS Access
2003) back end, and TeeChart .NET build 1.1.1879.21176. The application
graphs data on a 2D Scatter plot point series. Points are not shown on the
graphs, i.e. the point style property is set as PointerStyles.Nothing, the
points are not at all required but the labels (or markers) are. All that is
being graphed are Markers, hence the attributes (properties) of markers as a
series and individually is paramount. Each graph contains an arbitrary
number of series, each series is differentiated by marker attributes, each
marker within a series is differentiated by marker\label font size. In
general the plot loop is as follows;

MyGraphClassCollection mgraphs = new MyGraphClassCollection();
int mapindex = 0;

foreach (ParentPlot _pplot in ParentPlots)
{
MyGraphClass mgraph = new MyGraphClass();

ppseries = new Steema.TeeChart.Styles.Points();
pppoint = ppseries.Pointer;
ppmarks = ppseries.Marks;
ppfont = ppmarks.Font;
ppsetting = _pplot.LabelSetting;

//Point Settings
pppoint.Style = Steema.TeeChart.Styles.PointerStyles.Nothing;
pppoint.Visible = false; //Just to make sure

//Label-Marker settings
ppfont.Name = ppsetting.Name;
ppfont.Size = ppsetting.Size;
ppfont.Color = System.Drawing.Color.FromArgb(ppsetting.Colour);
//Bold, Italic and Underline properties are also set....

//Commit the series
ppseries.Add(_pplot.X, _pplot.Y, _pplot.Label);
this.tcgraph.Series.Add(ppseries);

foreach (AttributePlotCollection _attribs in _pplot.Attributes)
{
//Define the series and set properties for the markers at the series
level.
atseries = ...... (like above)

foreach (AttributePlot _attrib in _attribs)
{
//Define properties-attributes at the individual marker level,
in this case font size.
atplotfont.Size = _attrib.LabelFontSize;

atseries.Add(_attrib.X, _attrib.Y, _attrib.Label);
}// foreach (AttributePlot _attrib in _attribs)

this.tcgraph.Series.Add(atseries);
}//foreach (AttributePlotCollection _attribs in _pplot.Attributes)

mgraph.Name = _pplot.GraphName;
mgraph.Index = mapindex;
mgraph.Graph = new System.IO.MemoryStream();
this.tcgraph.Export.Template.IncludeData = true;
this.tcgraph.Export.Template.Save(mgraph.Graph);

mgraphs[mapindex] = mgraphs.Add(mgraph);
mapindex ++;
}//foreach (ParentPlot _pplot in ParentPlots)

//Adds a list of created graphs to a Combo Dropdown on the form with the
TeeChart graph so the user
//can select requested graphs to view.
this.combobox.Clear();

foreach(MyGraphClass graph in mgraphs)
{
this.combobox.Items.Add(graph.Name);
}//foreach(MyGraphClass graph in mgraphs)

When the graphs are first created, or rather, when the process completes and
the first graph is displayed,
all is well, everything (label-marker wise) is formatted correctly,
particularly the font sizes of individual markers.
As soon as the user selects graphs via the combo box (using
Import.Template.Load(graph.Graph);), the
font sizes of label contained within a particular series gets set to font
size 8 by the looks of things.
All other marker formats are retained except the font sizes which seem to
get level out to the same size
for that particular series.

Question being, is it possible to retain the different marker font sizes
with in a series when loading a chart
using ...Import.Template.Load(graph.Graph), given that graph.Graph is an
IO.MemoryStream. I know a work
around for this by creating a series for each individual marker graphed, but
this would take away or make very
difficult the check boxes in the legend all the users here have grown to
love so much. Is there anything I'm
missing or not doing correctly to make this happen?

Thank you very much Forum for your consideration and time in reading
this post.
Regards
2DScatterPlot.

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Tue May 17, 2005 12:05 pm

Hi,

this feature still not implemented in the latest TeeChart for Net version. But, it has been annotated and will be added in one of the next releases.

Post Reply