Skip to content

Saving memory-only chart as PNG #148

Answered by ghost
hellb0rg asked this question in Q&A
Discussion options

You must be logged in to vote

Use SKCartesianChart to save the chart as a PNG file:

var cartesianChart = new SKCartesianChart
{
    Width = 600,
    Height = 200,
    Series = new ObservableCollection<ISeries>
    {
        new LineSeries<double>
        {
            Values = new ObservableCollection<double> { 1, 6, 7, 2, 9, 3, 6, 5 }
        }
    }
};
cartesianChart.SaveImage("chart.png");

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@hellb0rg
Comment options

Answer selected by beto-rodriguez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant