highcharts / highcharts-android

Android wrapper for Highcharts usage
Other
126 stars 30 forks source link

Request for Enhanced Error Handling Capabilities in Highcharts Android SDK #274

Closed belporto closed 4 months ago

belporto commented 7 months ago

Dear Highcharts Team,

We are currently in the process of migrating our charts to utilize the Highcharts Android SDK and have encountered challenges regarding error handling that we believe are crucial to address for a successful migration.

As we work on migrating various chart types to the Android SDK, we have noticed that when passing an invalid value, the library only logs the error without providing any visual feedback on the rendered chart, resulting in a blank screen. Our team has explored the SDK documentation and APIs but has not found a built-in callback or method to capture and manage these errors systematically.

To ensure a smooth migration process and maintain the integrity of our charts, it is essential for us to have robust error handling capabilities that allow us to proactively address any issues that may arise. Capturing error information programmatically would enable us to identify and resolve mapping errors before they impact user experience or require customer feedback.

For example, consider the scenario where an unsupported graph type is mistakenly specified. The following Kotlin snippet demonstrates how an error in the type declaration impacts the chart rendering:

HIChart chart = new HIChart();
chart.setType("GraphNotSupported");
options.setChart(chart);

Screenshot 2024-03-05 at 19 05 31

In this example, specifying an unsupported graph type like "GraphNotSupported" may lead to unexpected behavior without providing explicit error feedback on the rendered chart.

We kindly request your assistance in determining if there are existing error handling capabilities within the Highcharts Android SDK that we may have overlooked. If such capabilities are not currently available, we respectfully request an enhancement to the SDK to include error handling features that provide developers with actionable insights for troubleshooting and optimizing chart rendering.

Your support in enhancing the error handling functionalities of the Highcharts Android SDK would greatly benefit developers like us in ensuring the quality and performance of our charting applications.

Thank you for considering our request and for your ongoing support.

MikolajMichalczak commented 7 months ago

Hi @belporto, Thank you for submitting your improvement proposal. I will thoroughly investigate the suggestion and provide a response as soon as possible.

MikolajMichalczak commented 7 months ago

@belporto As one of the possible solutions, I suggest setting the displayErrors flag to true on the HIChart() object. This might help to resolve some problems you're experiencing. Could you please try implementing this solution and confirm whether it resolves any issues you're encountering?

belporto commented 7 months ago

Hi @MikolajMichalczak , thank you for the reply. Doing the displayErrors to true will show the errors on the chart, but is it possible to add a callback to notify us so we can send the metrics to our system?

MikolajMichalczak commented 7 months ago

I am still investigating this possibility. Could you provide me in the meantime with other example of error, or perhaps the incorrect chart type is the only one you are currently dealing with?

belporto commented 7 months ago

We currently have thousands of different charts supported on our web page. Today, we are not showing them natively, and we have a webview provided by the web team rendering them. We will start migrating them to use the native library, and it's impossible for us to test all the possible cases manually. The customer can create custom reports. We will test extensively to ensure that we fix all the errors, but we are concerned that we may miss something, and our users may see a blank chart or an error. With the current implementation, we will only know if they complain. We want to anticipate this and have this tracked on our system so we can fix any charts as soon as possible.

belporto commented 5 months ago

Hi @MikolajMichalczak, I would like to ask if there is any follow-up action on our request here.

MikolajMichalczak commented 5 months ago

Hi @belporto,

Implementing this feature will take some time. Although we find it valuable, it appears that this specific request has not yet gained wider interest among our customers.

However, if you currently hold an active Advantage license with us, we might be able to consider a custom solution for you. Please send your license ID to support@highcharts.com. Once we have your license details, we will consider the possibility of implementing this feature specifically for you.

See https://www.highcharts.com/highcharts-advantage/

MikolajMichalczak commented 4 months ago

Closing due to inactivity. Please feel free to reopen the ticket if you have any further questions.