Questions regarding export charts to various formats
Questions regarding export charts to various formats
Hello,
We started to develop charts and have some questions regarding export:
1) For generating charts, we have strict rules, like which font size, line weight, etc. should be in some of them. We would like, that for previewing and for printing the image would not pixelate - we need to scale such image depending on dpi (from 300 - 1200dpi) for printing. On export, there is an option for width & height, we tried to increase it, but it looks like it just increased the image area, but font sizes or line width stayed the same. Does TeeChart have the functionality to scale images so that all font sizes, line weights, and other elements would scale accordingly on exporting JPEG or other formats?
2) For image proper scaling, we tried to use vector format and export the chart to SVG format. For the Pie type chart we see, that the circle line doesn't seem smooth. It looks like it was created from multiple lines. Is there any option, that would help to solve that Pie type chart would be smooth? Attached image pieChart.png
3) For chart type Line, after we increase the line width it starts to be visible, that two lines join have some white gaps. The more sharper the line connects another line, the more it is visible. Looks like, two rectangles were drawn without filling a smooth connection between them. There is a smooth option, but it creates an overall smoother chart, not between two connecting lines. How we can achieve, a nice connection between to lines so that it would not have gaps (or cut effect)? attachment linesConnectino.png
4) We tried to export the chart to different formats, and noticed, that for some formats it cuts images or has differences in drawing lines. On export to JPEG there aren't any vertical lines, but for SVG or EPS format it has. Does it mean, that for each export type, we should have different handling settings to get the same result? attached files: line_diffrencies.png, line_diffrencies.png
5) We tried to export the chart to EPS format with custom free font. This font is imported into Adobe Illustrator, so we tried to open it and Adobe Illustrator didn't recognize this font from EPS file. We tried to export to other formats, for JPEG font looks correct, but for SVG it's different. How to ensure, that the same fonts are used, regardless of which format we export the chart?
We started to develop charts and have some questions regarding export:
1) For generating charts, we have strict rules, like which font size, line weight, etc. should be in some of them. We would like, that for previewing and for printing the image would not pixelate - we need to scale such image depending on dpi (from 300 - 1200dpi) for printing. On export, there is an option for width & height, we tried to increase it, but it looks like it just increased the image area, but font sizes or line width stayed the same. Does TeeChart have the functionality to scale images so that all font sizes, line weights, and other elements would scale accordingly on exporting JPEG or other formats?
2) For image proper scaling, we tried to use vector format and export the chart to SVG format. For the Pie type chart we see, that the circle line doesn't seem smooth. It looks like it was created from multiple lines. Is there any option, that would help to solve that Pie type chart would be smooth? Attached image pieChart.png
3) For chart type Line, after we increase the line width it starts to be visible, that two lines join have some white gaps. The more sharper the line connects another line, the more it is visible. Looks like, two rectangles were drawn without filling a smooth connection between them. There is a smooth option, but it creates an overall smoother chart, not between two connecting lines. How we can achieve, a nice connection between to lines so that it would not have gaps (or cut effect)? attachment linesConnectino.png
4) We tried to export the chart to different formats, and noticed, that for some formats it cuts images or has differences in drawing lines. On export to JPEG there aren't any vertical lines, but for SVG or EPS format it has. Does it mean, that for each export type, we should have different handling settings to get the same result? attached files: line_diffrencies.png, line_diffrencies.png
5) We tried to export the chart to EPS format with custom free font. This font is imported into Adobe Illustrator, so we tried to open it and Adobe Illustrator didn't recognize this font from EPS file. We tried to export to other formats, for JPEG font looks correct, but for SVG it's different. How to ensure, that the same fonts are used, regardless of which format we export the chart?
- Attachments
-
- line_diffrencies.png (124.15 KiB) Viewed 28383 times
-
- linesConnection.png (135.98 KiB) Viewed 28383 times
-
- pieChart.png (56.53 KiB) Viewed 28383 times
-
- Newbie
- Posts: 1
- Joined: Mon Aug 28, 2023 12:00 am
Re: Questions regarding export charts to various formats
Additional information for
2)
We also see the Pie Chart Edge problem with PDF output *some* of the time when using Chart Export in WinForms designer. (It seems to be intermittent and sometimes has a smooth pie edge arc)
Addition information for
3)
In WinForms chart editor running on .NET 7 WinForms app we see there is a "rounded corners" option that seems to solve this problem however, this option does not seem to work when running the same NuGet package in a ASP.NET 7 Web API app.
2)
We also see the Pie Chart Edge problem with PDF output *some* of the time when using Chart Export in WinForms designer. (It seems to be intermittent and sometimes has a smooth pie edge arc)
Addition information for
3)
In WinForms chart editor running on .NET 7 WinForms app we see there is a "rounded corners" option that seems to solve this problem however, this option does not seem to work when running the same NuGet package in a ASP.NET 7 Web API app.
Re: Questions regarding export charts to various formats
Hello,
Re.
eg.
Regards,
Marc Meumann
Re.
You can modify the line endings:3) For chart type Line, after we increase the line width it starts to be visible, that two lines join have some white gaps. The more sharper the line connects another line, the more it is visible. Looks like, two rectangles were drawn without filling a smooth connection between them. There is a smooth option, but it creates an overall smoother chart, not between two connecting lines. How we can achieve, a nice connection between to lines so that it would not have gaps (or cut effect)? attachment linesConnectino.png
eg.
Code: Select all
line1.LinePen.EndCap = System.Drawing.Drawing2D.LineCap.Round;
Marc Meumann
Steema Support
Re: Questions regarding export charts to various formats
Hello,
There are several issues here that we are looking at. Some that are subject to design limitations, some for which we may be able to offer a workable approach for your requirements and at least one other that we may be able to add as a feature improvement. We will get back to this thread on each point.
Regards,
Marc
There are several issues here that we are looking at. Some that are subject to design limitations, some for which we may be able to offer a workable approach for your requirements and at least one other that we may be able to add as a feature improvement. We will get back to this thread on each point.
Regards,
Marc
Steema Support
Re: Questions regarding export charts to various formats
Hello,
Here's a review of your questions:
Re. 1
Re. 2
Re. 3
Re. 4
Re. 5.
In relation to your list of points, we're working on the areas where we think we can make improvements. You have reported on several image types. Do you have a preference for a format to use?
What version of Visual Studio NET and with which framework[s] are you working? (I saw NET7 referenced as one)
With thanks.
Regards,
Marc Meumann
Here's a review of your questions:
Re. 1
For bitmap formats such as JPEG & PNG, no. This to be automatic it would need to be done via vector formats such as SVG or PDF. We have run a few tests on resizing fonts when the canvas size is increased but work in this area would require further time. There is the option to manually include changes in the client project .. if width or height > x then font size = y .... That would require to be done for the key text elements of the Chart. In general it can be accomplished by controlling Axis Label, Series Mark, Titles and Legend text plus any tool or custom elements that have been added. Controlling a PNG export in this way may be the best solution.Does TeeChart have the functionality to scale images so that all font sizes, line weights, and other elements would scale accordingly on exporting JPEG or other formats?
Re. 2
Pie borders are currently rendered as a series of short polygons. For normal viewing sizes this is not an issue particularly when anti-aliased. We haven't seen symptoms as marked as your example but understand for a hugely expanded image that could occur as each polygon comes from 1º of the circumference. We will examine this area and could respond in two ways: either to increase the resolution (polygon frequency) or look to introduce an arc-path. The latter would be the better solution; we'll take a look.Pie Chart Edge problem [with PDF and SVG]
Re. 3
We'll take a look.Line-end rounding. Fails to work in NuGet package in a ASP.NET 7 Web API app
Re. 4
I noticed some issues on overall rectangle clipping and sizing that has been resolved during those tests. We'll need some specific example-code or project for your other observations (eg. no vertical line issue on JPEG export . does that refer to grid lines?). Some code to help reproduce the output t in your attached image would help us get nearer to the case of the issue.We tried to export the chart to different formats, and noticed, that for some formats it cuts images or has differences in drawing lines.
Re. 5.
Currently pending checksexport the chart to EPS format with custom free font.
In relation to your list of points, we're working on the areas where we think we can make improvements. You have reported on several image types. Do you have a preference for a format to use?
What version of Visual Studio NET and with which framework[s] are you working? (I saw NET7 referenced as one)
With thanks.
Regards,
Marc Meumann
Steema Support
Re: Questions regarding export charts to various formats
Vector format: EPS or SVGYou have reported on several image types. Do you have a preference for a format to use?
Re. 4
Exported chart template and data - I hope it will help to find the issue. Added SVG and JPEG to see the additional lines. Added everything to chart.zipSome code to help reproduce the output t in your attached image would help us get nearer to the case of the issue.
Attached two images side by side
- Attachments
-
- additionalLines.png (91.05 KiB) Viewed 28164 times
-
- chart.zip
- (19.89 KiB) Downloaded 1076 times
Re: Questions regarding export charts to various formats
In my previous reply, I exported a template with data. Is it enough to reproduce the issue regarding additional vertical lines in SVG export? I have another example, probably related to the same issue. I have tried to generate JPEG and SVG and it has a huge difference. Do we need to set up a different Chart for each export format? Ideally, we would like to have the chart preview to use JPEG and generate SVG/EPS to be able to scale the chart. Adding templates with data in the attachment.
Pie chart example: a) Is there a way, to ensure that texts do not overlap? Thailand, Cash in this example
b) On the right side we have SVG and it's totally different from JPEG format. How to control, that it would be the same? For some reason, it cuts the chart from all sides. (The header title for some reason is much closer to the pie chart).
c) Different line colors compared to JPEG and in some areas line goes beyond the circle main line. How to ensure consistency between formats?
Any news regarding:
- Pie Chart Edge issue? It was mentioned, that it would be resolved by increasing the resolution or introduction of an arc-path.
- Custom fonts for EPS investigation.
We use Steema.TeeChart.NET (4.2023.8.31)
Microsoft Visual Studio Professional 2022 (64-bit) - Version 17.5.3
Pie chart example: a) Is there a way, to ensure that texts do not overlap? Thailand, Cash in this example
b) On the right side we have SVG and it's totally different from JPEG format. How to control, that it would be the same? For some reason, it cuts the chart from all sides. (The header title for some reason is much closer to the pie chart).
c) Different line colors compared to JPEG and in some areas line goes beyond the circle main line. How to ensure consistency between formats?
Any news regarding:
- Pie Chart Edge issue? It was mentioned, that it would be resolved by increasing the resolution or introduction of an arc-path.
- Custom fonts for EPS investigation.
We use Steema.TeeChart.NET (4.2023.8.31)
Microsoft Visual Studio Professional 2022 (64-bit) - Version 17.5.3
- Attachments
-
- pie issue.zip
- (45.63 KiB) Downloaded 1084 times
-
- bar issues.zip
- (39.21 KiB) Downloaded 1065 times
Re: Questions regarding export charts to various formats
Could not add a bar chart example in an earlier post (I guess file limitation to attach).
a) The line color is different depending on the format. How to ensure the same color?
b) For a 3D bar chart, the grid two-line connection has white space between them. Are there any options to connect more smoothly?
c) why is the initial height different compared JPEG to SVG? How to set SVG, so that it would be exactly the same as in JPEG?
a) The line color is different depending on the format. How to ensure the same color?
b) For a 3D bar chart, the grid two-line connection has white space between them. Are there any options to connect more smoothly?
c) why is the initial height different compared JPEG to SVG? How to set SVG, so that it would be exactly the same as in JPEG?
Re: Questions regarding export charts to various formats
Thank you for the additional feedback. We're working through the points you've raised. Some issues have been resolved or are being worked on; improvements will be made to SVG export. We have currently not entered into checks on the Custom fonts for EPS question.
Re.
Tests correctly for jpeg and svg when run here
Regards,
Marc
Re.
The marks should render ok if Marks.AutoMarkPosition = true;a) Is there a way, to ensure that texts do not overlap? Thailand, Cash in this example
Tests correctly for jpeg and svg when run here
Regards,
Marc
Steema Support
Re: Questions regarding export charts to various formats
Progress report:
2 improvements will be included with an update build this week:
2 improvements will be included with an update build this week:
- correction of irregularities of circumference plot for Pie series in SVG export https://www.steema.com/bugs/show_bug.cgi?id=2636
- Improvements to text positioning for SVG export https://www.steema.com/bugs/show_bug.cgi?id=2637
Steema Support
Re: Questions regarding export charts to various formats
Returning to the lines connection issue.
but couldn't achieve that lines would look more properly connected.
Maybe there is some combination that prevents rounding the end cap settings? Attached exported template and data which is the result of my attached chart image.
I've tried to set
Code: Select all
line1.LinePen.EndCap = System.Drawing.Drawing2D.LineCap.Round;
Maybe there is some combination that prevents rounding the end cap settings? Attached exported template and data which is the result of my attached chart image.
- Attachments
-
- data_and_template.zip
- (14.96 KiB) Downloaded 978 times