akkiraju Posted June 15, 2009 Report Share Posted June 15, 2009 I have a requirement for drawing a Bubble Chart in windows application (VB.NET 2.0, Visual studio 2005). The requirement is that the application provides the negative values also for X and Y min/max values. Normal Bubble charts support only within the box. But, here the chart may be out of the box, I mean it goes to negative axis also. I need code for this. Can any one help in this please? Thanks in advance, Akki Quote Link to comment Share on other sites More sharing options...
AndreG Posted June 15, 2009 Report Share Posted June 15, 2009 Not sure what you mean. Bubble charts work the same as other charts, supporting negative as well as positive values. chart1.Gallery = Gallery.Bubble;chart1.Data.Series = 2;chart1.Data.Points = 4;chart1.Data.Y[0, 0] = 10;chart1.Data.Y[0, 1] = -10;chart1.Data.Y[0, 2] = -10;chart1.Data.Y[0, 3] = 10;chart1.Data.X[0, 0] = 10;chart1.Data.X[0, 1] = 10;chart1.Data.X[0, 2] = -10;chart1.Data.X[0, 3] = -10;chart1.Data.Y[1, 0] = 10;chart1.Data.Y[1, 1] = 10;chart1.Data.Y[1, 2] = 10;chart1.Data.Y[1, 3] = 10;chart1.AxisX.Max = 15;chart1.AxisX.Min = -15;chart1.AxisY.Max = 15;chart1.AxisY.Min = -15; Quote Link to comment Share on other sites More sharing options...
akkiraju Posted June 16, 2009 Author Report Share Posted June 16, 2009 Hi, I am sorry for not being clear. My requirement is as follows: I have to draw a bubble chart with the min value as -100 and maximum value=400 both for X and Y axis. The chart should be divided into 5 rows and 5 columns. Application will pass X and Y values. Now it should plot the bubble at that point where X and Y axis is specified. Kindly help me in this. Thanks in advance, Akki Quote Link to comment Share on other sites More sharing options...
AndreG Posted June 16, 2009 Report Share Posted June 16, 2009 I still do not see how that is different from the sample I posted (except for different values on the max and min of each axis). Have you tried that? Do you have a mock screenshot of what you are trying to achieve? Quote Link to comment Share on other sites More sharing options...
akkiraju Posted June 16, 2009 Author Report Share Posted June 16, 2009 I have tested whatever you have sent to me. I do not have mockup screen for this. I am still sorry for not being clear. I want the following: 1. I want to fix the number of rows and columns as 5*5 for a chart 2. Application will have two text boxes one for X value and one for Y value. If I click on submit, that should create a bubble at that position. I will try to find out the mockup screen too and will attach as soon as I get that. I am new to this and so all these confusions. My code as per the requirement is as follows: Chart1.Gallery = Gallery.Bubble Chart1.AxisX.Style = ChartFX.WinForms.AxisStyles.NotClippedChart1.Titles.Add(New TitleDockable("My Style")) Chart1.Titles(0).TextColor = Color.Black Chart1.LegendBox.Visible = FalseChart1.Data.Series = 0 'Chart1.Data.Points = 4Chart1.AxisX.Max = 400 Chart1.AxisX.Min = -100 Chart1.AxisY.Max = 400 Chart1.AxisY.Min = -100 Chart1.AxisX.FirstLabel = 0 Chart1.AxisY.FirstLabel = 0 Chart1.AxisY.LabelAngle = 90 Chart1.AxisX.Step = 100 Chart1.AxisY.Step = 100 'Chart1.AxisY.Labels(0) = ""Chart1.AxisY.Labels(0) = "Micro"Chart1.AxisY.Labels(1) = "Small"Chart1.AxisY.Labels(2) = "Medium"Chart1.AxisY.Labels(3) = "Large"Chart1.AxisY.Labels(4) = "Giant"Chart1.AxisY.LabelValue = 100 Chart1.AxisX.Labels(0) = "Deep Value"Chart1.AxisX.Labels(1) = "Value"Chart1.AxisX.Labels(2) = "Blend"Chart1.AxisX.Labels(3) = "Growth"Chart1.AxisX.Labels(4) = "Deep Growth"Chart1.AxisX.LabelValue = 100 Now the thing is to plot the X and Y values in the chart. Quote Link to comment Share on other sites More sharing options...
AndreG Posted June 16, 2009 Report Share Posted June 16, 2009 I made you a little project from what i understand about your requirements. If not what you were looking for, it should get u headed the right way. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.