Hello,
We are now trying upgrate to LC 10.4.1.1 and there is an problem with copying chart as EMF file. When chart is copied there is Title of chart visible. If we try to copy chart as BMP title is there. While investigating we have tried to do this
_lightningChart.SaveToFile("bla.svg");
_lightningChart.SaveToFile("bla.emf");
_lightningChart.SaveToFile("bla.bmp");
_lightningChart.CopyToClipboardAsEmf();
Even saved "bla.emf" and "bla.svg" did not shown Title of graph. But when we looked into "bla.svg" (you can see for yourself in bla.zip) we found out, that Title is inthere, just not visible because of clip-Path
<!ENTITY E27 '-56.31874 14 590.6812 14 590.6812 408 -56.31874 408 '>
<!ENTITY E26 'stroke:none;clip-path:url(#LC413_SetClip);font-family:Segoe UI Semibold;fill:rgb(0,0,0);font-size:10.8pt;opacity:1;'>
<text id="LC411" style="&E26;" transform="matrix(1 0 0 1 142.3187 13 ) " x="-57.31874" y="5.962499">Title of Graph Λ λ</text>
<clipPath id="LC413_SetClip">
<polygon points="&E27;" id="LC414" />
</clipPath>
"Title of Graph Λ λ" should be visible, but clip-path in E26 causes it to be invisible. If you delete it, it will show up. We think similar issue could be reason why in EMF title is also not visible.
Do you know how to solve this issue ?
Thank you
ChartTitle not visible EMF
Moderator: Queue Moderators
ChartTitle not visible EMF
- Attachments
-
- TitleExampleFiles.zip
- Example files generated by LightningChart
- (69.34 KiB) Downloaded 60 times
-
- Posts: 557
- Joined: Mon Mar 14, 2016 9:22 am
Re: ChartTitle not visible EMF
Thank you for the report.
The most funny thing that chart title not always disappear in EMF output.
There are a lot of usage of clip-rectangles in rendering pipeline. It appears that one of clipping is not reset/initiated properly.
In particular, if you disable _chart.ViewXY.LegendBoxes[0].Visible property, then _chart.Title will disappear in EMF format image. If LegendBoxis visible - no problem with title.
Therefore, the workaround (until the proper fix) for hiding LegendBox is to keep Legend visible but outside chart
Hope this helps.
The most funny thing that chart title not always disappear in EMF output.
There are a lot of usage of clip-rectangles in rendering pipeline. It appears that one of clipping is not reset/initiated properly.
In particular, if you disable _chart.ViewXY.LegendBoxes[0].Visible property, then _chart.Title will disappear in EMF format image. If LegendBoxis visible - no problem with title.
Therefore, the workaround (until the proper fix) for hiding LegendBox is to keep Legend visible but outside chart
Code: Select all
_chart.ViewXY.LegendBoxes[0].Visible = true;
_chart.ViewXY.LegendBoxes[0].Position = LegendBoxPositionXY.Manual;
_chart.ViewXY.LegendBoxes[0].Offset = new PointIntXY(-1000, -1000);
Re: ChartTitle not visible EMF
Thank you for you reply. Workaround is working as you described