Hi,
I would like to display a hierarchical scale with Nevron WinForm (using Q3 2008 version for VS2005).
I have some problems to resize the "column" of text in the second level of nodes (there will be arbitrarily long strings not known at compile time).
Here is the code I used (modified from the sample provided with the library):
NHierarchicalScaleConfigurator scale =
new NHierarchicalScaleConfigurator ();
NHierarchicalScaleNodeCollection nodes = scale.Nodes;
for (int i = 0; i < 8; i++)
{
NHierarchicalScaleNode yearNode = new NHierarchicalScaleNode
(1, "jkhghgkgjkgjk ");
yearNode.LabelStyle.TickMode = RangeLabelTickMode.Separators;
nodes.AddChild (yearNode);
for (int j = 0; j < 4; j++)
{
/* here I would like display horizontal text who
scale with text length*/
NHierarchicalScaleNode quarterNode = new NHierarchicalScaleNode (1, "Q54dfdf
sqd qsd qs dsqsd sqd qds dsffdsfsdfdsdfsdfsdf");
quarterNode.LabelStyle.TickMode =
RangeLabelTickMode.Separators;
NScaleLabelAngle angle = new NScaleLabelAngle (0);
quarterNode.LabelStyle.Angle = angle;
yearNode.ChildNodes.AddChild (quarterNode);
}
}
scale.CreateSeparatorForEachLevel = true;
nChartControl1.Charts[0].Axis(
StandardAxis.PrimaryX).ScaleConfigurator = scale;
nChartControl1.Refresh ();
Can you help me ?