Profile Picture

hierarchical scale display with own text length

Posted By james kouthon 14 Years Ago
Author
Message
james kouthon
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 1, Visits: 1

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 ?

 



Attachments
testHierarchicalGraph.jpg (59 views, 114.00 KB)



Similar Topics


Reading This Topic