Rendering your TeeChart.NET web project to Azure is relatively straightforward:
Creating the project
Create the ASP.NET or MVC project in the way that you normally would do. There are notes here to help:
- Charting on ASP.NET: http://www.teechart.net/docs/teechart/n ... ations.htm
Charting with MVC: https://steema.com/wp/blog/2017/09/18/t ... t-with-mvc
If your Chart render type is Javascript/HTML5 you need take no further action, simply publish your charting application to Azure using Visual Studio's Publish option (right mouse button on the project in Solution-Explorer to show menu, then select 'Publish'). Assuming that you already have a Microsoft Azure subscription active you will be led through the steps to publish to your application space, if not you will be prompted to set up an account.
Publishing with chart render style as an image format (PNG, JPEG, etc)
Azure Websites resist the creation of a Graphics IntPtr handle. For local servers that is no problem but blocks the rendering of the Chart on Azure when exporting static images. When using a Chart on a Webform the solution is already built in but if you manage your own image export your should change TeeChart's image buffering option.
Set the buffer to none:
Code: Select all
tChart.Chart.Graphics3D.BufferStyle = Steema.TeeChart.Drawing.BufferStyle.None;
You can now publish your charting application to Azure using Visual Studio's Publish option (right mouse button on the project in Solution-Explorer to show menu, then select 'Publish'). Assuming that you already have a Microsoft Azure subscription active you will be led through the steps to publish to your application space, if not you will be prompted to set up an account.