This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello, How can I shrink the size of a chart? For example take the Line Charts in your sample application and shrink it to half the size (but still be fully functional). (with all the labels, legend, etc. also shrinking proportionally.) I tried several approaches but was unsuccessful. I tried ScaleTransform, Viewbox, tried changing the height and width of the chart,.... Thank you Oscar |
|
|
Hello Oscar By setting the width and height, or causing your application layout to put the chart in a smaller area, you will be able to control the size of the chart. Is it that you also want to shrink the size of the legend, and size of the numbers on the axis etc? If so, you'll need to create some custom styles/templates to customize the look of each part of the chart. We have an example of chart customizations in the Sample Explorer -> Charts -> Features -> Custom Style. Let me know if you have any questions as you work on this. -Jason Fauchelle |
|
|
Thanks Jason, Yes I would like to try and shrink the legend, numbers on axis, axis title, etc. (everything the user sees wrt the chart) all at the same time by the same amount. I would like show a full size chart to the user with all their data at some othere part of the application. However elsewhere I would like to provide the user with the ability to change some charting options and provide them with a preview of what the chart might look like but in a much smaller version of the chart. I was hoping as an easy quick way I could use the LayoutTransform provided at the If I use your suggested approach would I need to connect the LayoutTransform to each style for each element (ie. Title, Axis labels, Legend,....) ? . . . Oscar |
|
|
Hello Oscar Rather than LayoutTransform, you may want to try setting the RenderTransform of the Chart control to a ScaleTransform with 50% scale. This will shrink the entire chart evenly. A minor problem with this is that thin lines such as the axis or background grid lines will become much thinner, or may even disappear. If this turns out to not be a problem though, then RenderTransform will be the easy quick way that you want! If the thin lines is a problem, you could combat this by providing a custom style to axis and grid lines that thicken them, so that when they are shrunk they look fine. -Jason Fauchelle |
|
|
Thanks Jason, That worked. Oscar |
|