Range Chart or Coloring Stock Chart


Author
Message
Jerry Jacob
Jerry Jacob
Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)
Group: Forum Members
Posts: 15, Visits: 78
Initially I made a range chart but I could not find out how to change the width of the line to be the size I wanted, however the coloring worked.

Next I tried to instead use a stock chart to do the same thing, and while the width is great, I can't seem to figure out how to change the color of each bar.  I have the following and it doesn't seem to work.

Color lineColor = Color.FromArgb(convertedItems[0],convertedItems[1],convertedItems[2]);
range.FillStyles[i] = new NColorFillStyle(lineColor);

Any suggestions?
Replies
Jerry Jacob
Jerry Jacob
Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)
Group: Forum Members
Posts: 15, Visits: 78
Thanks for the quick responses.  I was able to figure out the problem.  I believe the problem was that I was rotating the chart by switching to 3d and rotate 270.  After using it in 2d and Left to Right Orientation the bars seem to be resizing correctly.

On this same chart I am trying to use markers or data points, not sure which is better to use for my case but I want to be able to take the diamond and instead of having it as a square rotated be a thinner diamond.  I tried adjusting the width Percent and height percent.  Doing this for the bar Shape worked as I wanted by adjusting width percent to 5 and height percent to 1.  The diamond turns into a marker that looks like >. Is there a way to just make the diamond thinner while preserving the height?
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
Hi Jerry,
The marker style has properties called Width and Height that control the size of the marker - for example:

   NChart chart = nChartControl1.Charts[0];

   NBarSeries bar = new NBarSeries();

   bar.Values.Add(10);
   bar.Values.Add(20);
   bar.Values.Add(30);

   bar.MarkerStyle.Visible = true;
   bar.MarkerStyle.PointShape = PointShape.Diamond;
   bar.MarkerStyle.Width = new NLength(10);
   bar.MarkerStyle.Height = new NLength(20);

   chart.Series.Add(bar);



Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search