Bubble value displayed within the bubble itself
Bubble value displayed within the bubble itself
Hi I am trying to display the numerical value on top of each bubble that is displayed within a grid. is this possible with the bubble charts
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Chuck,
Yes, this is possible using series marks as shown here:
Yes, this is possible using series marks as shown here:
Code: Select all
Private Sub Form_Load()
With TChart1.Series(0)
.FillSampleValues 10
.Marks.Visible = True
'You can play with ArrowLength to position the marks
.Marks.ArrowLength = -5
.Marks.Arrow.Visible = False
End With
End Sub
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi Thanks, This is something like what I want but this is displaying the Ax value of the bubble. i wish it to display the ARadius value of the bubble. See code below.
pointColor= Convert.ToUInt32(System.Drawing.ColorTranslator.ToOle(SeriesColor(seriesNum)));
axTChart2.Series(seriesNum).ColorEachPoint = false;
axTChart2.Series(seriesNum).asBubble.AddBubble(Convert.ToDouble(dr[X]),Convert.ToDouble(dr[Y]),(Convert.ToDouble(dr[Mag])/fr)/2, "",16777215);
axTChart2.Series(seriesNum).asBubble.Pointer.Pen.Color = pointColor;
axTChart2.Series(seriesNum).asBubble.Pointer.Pen.Style = TeeChart.EChartPenStyle.psSolid;
axTChart2.Series(seriesNum).asBubble.Pointer.Pen.Width = 1;
axTChart2.Series(seriesNum).asBubble.Pointer.Pen.Visible = true;
axTChart2.Series(seriesNum).Marks.Visible = true;
pointColor= Convert.ToUInt32(System.Drawing.ColorTranslator.ToOle(SeriesColor(seriesNum)));
axTChart2.Series(seriesNum).ColorEachPoint = false;
axTChart2.Series(seriesNum).asBubble.AddBubble(Convert.ToDouble(dr[X]),Convert.ToDouble(dr[Y]),(Convert.ToDouble(dr[Mag])/fr)/2, "",16777215);
axTChart2.Series(seriesNum).asBubble.Pointer.Pen.Color = pointColor;
axTChart2.Series(seriesNum).asBubble.Pointer.Pen.Style = TeeChart.EChartPenStyle.psSolid;
axTChart2.Series(seriesNum).asBubble.Pointer.Pen.Width = 1;
axTChart2.Series(seriesNum).asBubble.Pointer.Pen.Visible = true;
axTChart2.Series(seriesNum).Marks.Visible = true;
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Chuck,
Ok, you can achieve that using the OnGetSeriesMark event as shown here:
Ok, you can achieve that using the OnGetSeriesMark event as shown here:
Code: Select all
private void Form1_Load(object sender, System.EventArgs e)
{
this.axTeeCommander1.Parent=this.axTChart1;
this.axTChart1.Series(0).FillSampleValues(10);
this.axTChart1.Series(0).Marks.Visible=true;
}
private void axTChart1_OnGetSeriesMark(object sender, AxTeeChart.ITChartEvents_OnGetSeriesMarkEvent e)
{
e.markText = this.axTChart1.Series(0).asBubble.RadiusValues.get_Value(e.valueIndex).ToString();
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Chuck,
OnGetSeriesMark is called for every series so you can use e.seriesIndex:
OnGetSeriesMark is called for every series so you can use e.seriesIndex:
Code: Select all
private void axTChart1_OnGetSeriesMark(object sender, AxTeeChart.ITChartEvents_OnGetSeriesMarkEvent e)
{
e.markText = this.axTChart1.Series(e.seriesIndex).asBubble.RadiusValues.get_Value(e.valueIndex).ToString();
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Thanks but this is still not working. See my code below:
foreach(DataRow dr in datarows)
{
if (getPageName(dr) == pg)
{
if (dr[X] != System.DBNull.Value && dr[Y]!= System.DBNull.Value && dr[Mag] != System.DBNull.Value)
{
string sery = getCurveName(dr);
System.UInt32 pointColor;
int seriesNum = series.IndexOf(sery);
if (seriesNum < 0)
{
seriesNum = series.Add(sery);
axTChart2.AddSeries(TeeChart.ESeriesClass.scBubble);
axTChart2.Series(seriesNum).Title = sery;
}
pointColor= Convert.ToUInt32(System.Drawing.ColorTranslator.ToOle(SeriesColor(seriesNum)));
axTChart2.Series(seriesNum).ColorEachPoint = false;
axTChart2.Series(seriesNum).asBubble.AddBubble(Convert.ToDouble(dr[X]),Convert.ToDouble(dr[Y]),(Convert.ToDouble(dr[Mag])/fr)/2, "",16777215);
axTChart2.Series(seriesNum).asBubble.Pointer.Pen.Color = pointColor;
axTChart2.Series(seriesNum).asBubble.Pointer.Pen.Style = TeeChart.EChartPenStyle.psSolid;
axTChart2.Series(seriesNum).asBubble.Pointer.Pen.Width = 1;
axTChart2.Series(seriesNum).asBubble.Pointer.Pen.Visible = true;
axTChart2.Series(seriesNum).Marks.Visible = true;
}
}
}
private void axTChart2_OnGetSeriesMark(object sender, AxTeeChart.ITChartEvents_OnGetSeriesMarkEvent e,int seriesnum)
{
e.markText = this.axTChart2.Series(e.seriesIndex).asBubble.RadiusValues.get_Value(e.valueIndex).ToString();
}
How is the OnGetSeriesMark called from the main chart creation?
Realy appreciate your help here!!
foreach(DataRow dr in datarows)
{
if (getPageName(dr) == pg)
{
if (dr[X] != System.DBNull.Value && dr[Y]!= System.DBNull.Value && dr[Mag] != System.DBNull.Value)
{
string sery = getCurveName(dr);
System.UInt32 pointColor;
int seriesNum = series.IndexOf(sery);
if (seriesNum < 0)
{
seriesNum = series.Add(sery);
axTChart2.AddSeries(TeeChart.ESeriesClass.scBubble);
axTChart2.Series(seriesNum).Title = sery;
}
pointColor= Convert.ToUInt32(System.Drawing.ColorTranslator.ToOle(SeriesColor(seriesNum)));
axTChart2.Series(seriesNum).ColorEachPoint = false;
axTChart2.Series(seriesNum).asBubble.AddBubble(Convert.ToDouble(dr[X]),Convert.ToDouble(dr[Y]),(Convert.ToDouble(dr[Mag])/fr)/2, "",16777215);
axTChart2.Series(seriesNum).asBubble.Pointer.Pen.Color = pointColor;
axTChart2.Series(seriesNum).asBubble.Pointer.Pen.Style = TeeChart.EChartPenStyle.psSolid;
axTChart2.Series(seriesNum).asBubble.Pointer.Pen.Width = 1;
axTChart2.Series(seriesNum).asBubble.Pointer.Pen.Visible = true;
axTChart2.Series(seriesNum).Marks.Visible = true;
}
}
}
private void axTChart2_OnGetSeriesMark(object sender, AxTeeChart.ITChartEvents_OnGetSeriesMarkEvent e,int seriesnum)
{
e.markText = this.axTChart2.Series(e.seriesIndex).asBubble.RadiusValues.get_Value(e.valueIndex).ToString();
}
How is the OnGetSeriesMark called from the main chart creation?
Realy appreciate your help here!!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Chuck,
You can define the event at the design view, at the AxTChart properties window or at run-time like this:
You can define the event at the design view, at the AxTChart properties window or at run-time like this:
Code: Select all
private void Form1_Load(object sender, System.EventArgs e)
{
this.axTeeCommander1.Parent=this.axTChart1;
this.axTChart1.Series(0).FillSampleValues(10);
this.axTChart1.Series(0).Marks.Visible=true;
this.axTChart1.OnGetSeriesMark += new AxTeeChart.ITChartEvents_OnGetSeriesMarkEventHandler(axTChart1_OnGetSeriesMark);
}
private void axTChart1_OnGetSeriesMark(object sender, AxTeeChart.ITChartEvents_OnGetSeriesMarkEvent e)
{
e.markText = this.axTChart1.Series(e.seriesIndex).asBubble.RadiusValues.get_Value(e.valueIndex).ToString();
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Chuck,
Could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
Could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at news://www.steema.net/steema.public.attachments newsgroup.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Chuck,
Ok, please send your example to me.
Ok, please send your example to me.
Last edited by Narcís on Wed Oct 04, 2006 11:04 am, edited 1 time in total.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Chuck,
Yes I received the code and we will review it and reply here ASAP.
Yes I received the code and we will review it and reply here ASAP.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |