MPAndroidChart
MPAndroidChart copied to clipboard
Generate Bitmap without rendering a chart view
Is there anyway I can generate a Bitmap from a LineChart without the LineChart actually being rendered onto the UI? I'm trying to instantiate a new LineChart object programatically in a background service and generate a Bitmap from that LineChart. However, since the LineChart isn't actually being rendered or added to any Activity/Fragment, calling getChartBitmap() fails since it requires the LineChart to have a height and width, which is only determined once the view is rendered.
Basically, I don't need the Chart to be rendered onto the screen or anything. I just need a Bitmap object of the chart. Is this possible?
Has anyone figured out how to do this?