Good afternoon Yeray
Thanks for your reply. It appears I did not pose my previous question clearly enough - perhaps I did not use the correct terminology.
My program allows the selection of standard brush styles (e.g. bsSolid, bsHorizontal, etc), together with foreground and background colours. The selected brush style is stored in a field of a database table as a number from 0 to 7 (corresponding to the 8 standard brush styles), with the colours as integers. My questions are:
1. Is it possible to create a custom list of brush styles, using bitmaps?
2. If so, how do I implement this?
3. If not, how can I integrate the existing brush styles with brush images.
While this may not strictly be a TeeChart issue, I expected a wider range of brush styles available for your bar charts, so would appreciate assistance in this area.
Best regards
Errol
Stacked Bar Chart
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Stacked Bar Chart
Hi Errol,
No, I don't think it is possible using current TeeChart functionality unless you modify or extend current TeeChart sources to support that. Maybe you could try overriding TTeeBrush class, implement additional functionality and replace brushes in your series with this new class.
Thanks in advance.
No, I don't think it is possible using current TeeChart functionality unless you modify or extend current TeeChart sources to support that. Maybe you could try overriding TTeeBrush class, implement additional functionality and replace brushes in your series with this new class.
This is a VCL's TBrushStyle limitation, I'm afraid. Anyway, which kind of brush styles would you like TeeChart to have? Feel free to submit your feature requests at Steema Software's bugzilla. Doing so you'll be notified of any update on the issue.Errol wrote: While this may not strictly be a TeeChart issue, I expected a wider range of brush styles available for your bar charts, so would appreciate assistance in this area.
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 |
Re: Stacked Bar Chart
Hi Narcis
I am still having problems with your suggestions regarding editing Bar Chart legends, namely:
"You can either set the LegendStyle property or use the OnGetLegendText event to parse and remove it or Chart1.Legend.Items list as in the All Features\Welcome!\Miscellaneous\Legend\Items property."
I have two items showing in my Stacked Bar Chart legend, namely the Depth Increment (presumably a default setting) and the Rock Type (presumably set by XLabelsSource). I looked at the Chart.Legend.Items list and do not seem to be able to find a way of either editing the items or hiding one item in the list. I then looked at the OnGetLegendText event - this tells me that the LegendText has the typical form 100-TUF (depth increment followed by the rock type code), even though the legend is written as 100 TUF. However, the separator is clearly something different as I am unable to find it As each item of the legend has variable length, I cannot trim a fixed number of characters.
Regards
Errol
I am still having problems with your suggestions regarding editing Bar Chart legends, namely:
"You can either set the LegendStyle property or use the OnGetLegendText event to parse and remove it or Chart1.Legend.Items list as in the All Features\Welcome!\Miscellaneous\Legend\Items property."
I have two items showing in my Stacked Bar Chart legend, namely the Depth Increment (presumably a default setting) and the Rock Type (presumably set by XLabelsSource). I looked at the Chart.Legend.Items list and do not seem to be able to find a way of either editing the items or hiding one item in the list. I then looked at the OnGetLegendText event - this tells me that the LegendText has the typical form 100-TUF (depth increment followed by the rock type code), even though the legend is written as 100 TUF. However, the separator is clearly something different as I am unable to find it As each item of the legend has variable length, I cannot trim a fixed number of characters.
Regards
Errol
Re: Stacked Bar Chart
Hi Errol,
Your last reply seems to treat completely different issues to the discussed in the thread where you posted it. That's why I split it into a new thread.
Please, try to open a new thread for each different issue or problem to report. This makes things easier for us and for anyone with a similar problem looking for the solution suggested.
We'll reply the inquiries asap.
Your last reply seems to treat completely different issues to the discussed in the thread where you posted it. That's why I split it into a new thread.
Please, try to open a new thread for each different issue or problem to report. This makes things easier for us and for anyone with a similar problem looking for the solution suggested.
We'll reply the inquiries asap.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Stacked Bar Chart
Hi Errol,
This Items list needs the chart to be drawn to be populated, that's why I edit it after forcing a chart repaint (Chart.Draw):
I understand you want to use checkboxes in the legend to show/hide bars in the chart. This works fine with lsSeries LegendStyle (or with lsAuto because it behaves as lsSeries when more than one series are active) but not with lsValues.
If you want to fully customize the Legend, you may want to check the CustomLegendTool. See the example at "What's New\Welcome !\New Chart Tools\Custom Legend Tool"
I've made a simple example to test the items property. It seems to work perfectly for me here.Errol wrote:I am still having problems with your suggestions regarding editing Bar Chart legends, namely:
"You can either set the LegendStyle property or use the OnGetLegendText event to parse and remove it or Chart1.Legend.Items list as in the All Features\Welcome!\Miscellaneous\Legend\Items property."
I have two items showing in my Stacked Bar Chart legend, namely the Depth Increment (presumably a default setting) and the Rock Type (presumably set by XLabelsSource). I looked at the Chart.Legend.Items list and do not seem to be able to find a way of either editing the items or hiding one item in the list. I then looked at the OnGetLegendText event - this tells me that the LegendText has the typical form 100-TUF (depth increment followed by the rock type code), even though the legend is written as 100 TUF. However, the separator is clearly something different as I am unable to find it As each item of the legend has variable length, I cannot trim a fixed number of characters.
This Items list needs the chart to be drawn to be populated, that's why I edit it after forcing a chart repaint (Chart.Draw):
Code: Select all
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
Chart1.View3D:=false;
Chart1.Legend.Alignment:=laBottom;
Chart1.Legend.CheckBoxes:=true;
for i:=0 to 4 do
with Chart1.AddSeries(TBarSeries) as TBarSeries do
begin
FillSampleValues(1);
MultiBar:=mbStacked;
MarksOnBar:=true;
MarksLocation:=mlCenter;
end;
Chart1.Draw;
for i:=0 to Chart1.Legend.Items.Count-1 do
Chart1.Legend.Item[i].Text:='hello series ' + IntToStr(i);
end;
If you want to fully customize the Legend, you may want to check the CustomLegendTool. See the example at "What's New\Welcome !\New Chart Tools\Custom Legend Tool"
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |