5 Answers, 1 is accepted
0
Accepted
Hello Steve,
Thank you for writing.
You can use the HTML-like Text Formatting to set the chart title.
Let me know if you have additional questions.
Regards,
Dimitar
Telerik
Thank you for writing.
You can use the HTML-like Text Formatting to set the chart title.
Let me know if you have additional questions.
Regards,
Dimitar
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Steve
Top achievements
Rank 1
answered on 23 Mar 2016, 07:03 PM
Awkward, but it works, thanks.
btw, the link is bad.
0
Hi Steve,
Here is the correct link: HTML-like Text Formatting.
Please let me know if there is something else I can help you with.
Regards,
Dimitar
Telerik
Here is the correct link: HTML-like Text Formatting.
Please let me know if there is something else I can help you with.
Dimitar
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Steve
Top achievements
Rank 1
answered on 24 Mar 2016, 10:13 PM
Unfortunately I encountered a problem with this solution. It looks fine on the screen but when I call ExportToImage, it renders the HTML code to the image. The attached file cdf-screenshot is how it looks on the screen and the file cdf-exporttoimage is how it looks after calling ExportToImage
0
Hello Steve,
Thank you for writing back.
This is considered an issue and I have logged it in our Feedback Portal. It is caused because the text is not painted with the correct method. You can track the item for status changes and add your vote for it here.
To workaround this you can manually paint the text:
Your Telerik Points have been updated for this report.
Should you have any other questions do not hesitate to ask.
Regards,
Dimitar
Telerik
Thank you for writing back.
This is considered an issue and I have logged it in our Feedback Portal. It is caused because the text is not painted with the correct method. You can track the item for status changes and add your vote for it here.
To workaround this you can manually paint the text:
private
void
radButton1_Click(
object
sender, EventArgs e)
{
radChartView1.ShowTitle =
false
;
TextPrimitiveHtmlImpl impl =
new
TextPrimitiveHtmlImpl();
TextParams textParams =
this
.radChartView1.ChartElement.TitleElement.TextParams;
SizeF size = impl.MeasureOverride(
new
SizeF(500f, 200), textParams);
using
(MemoryStream stream =
new
MemoryStream())
{
radChartView1.ExportToImage(stream,
new
Size(500, 500 - (
int
)size.Height));
Bitmap bmp =
new
Bitmap(500, 500);
using
(Graphics g = Graphics.FromImage(bmp))
{
g.Clear(Color.White);
textParams.paintingRectangle =
new
RectangleF(Point.Empty, size);
impl.PaintPrimitive(
new
RadGdiGraphics(g), textParams);
g.DrawImage(Image.FromStream(stream), 0, size.Height, 500, 500 - size.Height);
}
bmp.Save(@
"D:\xfile.bmp"
);
}
radChartView1.ShowTitle =
true
;
}
Your Telerik Points have been updated for this report.
Should you have any other questions do not hesitate to ask.
Regards,
Dimitar
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.