Hi,
I have a webchart created and I would like to force to show all the bottom axis horizontal labels programmatically. How do I do that?
Thanks.
rgds,
stephen
WebChart Bottom Axis Labels Missing
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi stephen,
You may want to read "Tutorials 4 - Axis Control" for axis settings information. You can also have a lookt at the custom labels feature in the features demo, available at TeeChart's program group. The example can be found at All Features\Welcome !\Axes\Labels\Custom labels.
You may want to read "Tutorials 4 - Axis Control" for axis settings information. You can also have a lookt at the custom labels feature in the features demo, available at TeeChart's program group. The example can be found at All Features\Welcome !\Axes\Labels\Custom labels.
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 Narcís,
I am able to get the custom labels using the following:
wChart.Chart.Axes.Bottom.Labels.Items.Add(value, name)
However, the labels only get displayed on second postback. If I perform wChart.Chart.Axes.Bottom.Labels.Items.Clear, the custom labels could not be displayed at all. But if I did not clear them, the labels were duplicated on every postback.
Please help!
Thanks,
stephen
I am able to get the custom labels using the following:
wChart.Chart.Axes.Bottom.Labels.Items.Add(value, name)
However, the labels only get displayed on second postback. If I perform wChart.Chart.Axes.Bottom.Labels.Items.Clear, the custom labels could not be displayed at all. But if I did not clear them, the labels were duplicated on every postback.
Please help!
Thanks,
stephen
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi stephen,
After adding the custom labels you could try using this:
After adding the custom labels you could try using this:
Code: Select all
Bitmap bmp = wChart.Chart.Bitmap;
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 Narcís,
What is the purpose of adding this line:
I have added this line but I did not see any difference.
I tried to move it to the following function:
and I can see all the labels in the bitmap saved.
However, it is still not reflected in the Chart component output on the website.
By the way, the Chart that I created has "drill down" capabability.
It is not purely an image right?
Please help!
Thanks,
stephen
What is the purpose of adding this line:
Code: Select all
Bitmap bmp = wChart.Chart.Bitmap;
I tried to move it to the following function:
Code: Select all
Private Sub seriesHotspot1_GetHTMLMap(ByVal sender As Steema.TeeChart.Tools.SeriesHotspot, ByVal e As Steema.TeeChart.Tools.SeriesHotspotEventArgs)
If e.Series.GetType.Name.Contains("Horiz") Then
e.PointPolygon.Title = e.Series.Labels(e.PointPolygon.ValueIndex) + " " + Format(e.Series.XValues.Value(e.PointPolygon.ValueIndex), sender.Chart.Axes.Bottom.Labels.ValueFormat)
Else
e.PointPolygon.Title = e.Series.Labels(e.PointPolygon.ValueIndex) + " " + Format(e.Series.YValues.Value(e.PointPolygon.ValueIndex), sender.Chart.Axes.Left.Labels.ValueFormat)
End If
e.PointPolygon.HREF = "#"
Dim myProcess As String = "onclick=""javascript:__doPostBack('" + Me.Parent.ID + "#$#$#DrillDown#$#$#" + e.Series.Item(e.PointPolygon.ValueIndex).Label.ToString() + "', '" + sender.Chart.SubHeader.Text.ToString() + "');"""
e.PointPolygon.Attributes = String.Format(myProcess, e.PointPolygon.ValueIndex.ToString())
wChart.Chart.Axes.Bottom.Labels.Items.Add(e.Series.XValues.Value(e.PointPolygon.ValueIndex), e.Series.Labels(e.PointPolygon.ValueIndex))
Dim bmp As Bitmap = wChart.Chart.Bitmap
bmp.Save("c:\Temp\chart.bmp") 'just to see the output
End Sub
However, it is still not reflected in the Chart component output on the website.
By the way, the Chart that I created has "drill down" capabability.
It is not purely an image right?
Please help!
Thanks,
stephen
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi stephen,
Thanks in advance.
This forces the chart being internally repainted. I suggested this to force custom labels being painted.What is the purpose of adding this line:
Code:
Bitmap bmp = wChart.Chart.Bitmap;
Could you please send us a simple example project we can run "as-is" to reproduce the problem here? You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.and I can see all the labels in the bitmap saved.
However, it is still not reflected in the Chart component output on the website.
Yes, when using HotSpots tool it's like a "map" image.By the way, the Chart that I created has "drill down" capabability.
It is not purely an image right?
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 stephen,
No problem, I'm glad to hear you solved the issue.
No problem, I'm glad to hear you solved the issue.
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 |