Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fusion Chart not showing properly in iOS - WKWebView #24

Open
thedahiyaboy opened this issue Dec 12, 2019 · 1 comment
Open

Fusion Chart not showing properly in iOS - WKWebView #24

thedahiyaboy opened this issue Dec 12, 2019 · 1 comment

Comments

@thedahiyaboy
Copy link

In iOS, fusion chart was working fine in UIWebView (as shown below sample image from my project).

Now in iOS, UIWebView has been replaced with WKWebVeiw. After replacing the UIWebView to WKWebView, same fusion graph is not showing properly in the WKWebView.

Graph in UIWebView

UIWebView

Graph in WKWebView

  • Graph is zoomed out.
  • Fonts are very small.

WKWebView

Fusion Chart Code

 function showChart(dataChart,chartWidht,chartHeight,chartTypeValue){
 
  FusionCharts.ready(function(){

  var chartVar = dataChart;
  var ctype;
  
  // Get Chart Type.
  switch (chartTypeValue) {
                     
    case 1:
    ctype = "stackedcolumn2d";
    break;
    
    case 2:
    ctype = "pie3d";
    break;
    
    case 3:
    ctype = "column2d";
    break;
    
    default :
    ctype = "stackedcolumn2d";
    break;
                     
  }
                     
   var ddd = JSON.stringify(chartVar);
   var ddd2 = JSON.parse(ddd);
   var width = chartWidht;
   var height = chartHeight;

   // Height and width variable are not in use.
                     
   var revenueChart = new FusionCharts({
        
        "type": ctype,      // 1 == stackedcolumn2d 2 == pie3d 3 == column2d
        "renderAt": "chartContainer",
        "width": "100%",
        "height": "100%",
        "dataFormat": "json",
        "dataSource": ddd2

  });
                     
    revenueChart.render();
                     
 })
 }

System Configuration

  • Swift 4.x
  • iOS 12.x
@soumyasankarduttagit
Copy link

Hi,

Thanks for getting in touch.

From both the image we could find two different data source has been provided.

Could you please confirm whether the same data source has been provided.

Also please let us know if any error you are getting at your end and if possible please upload the entire project in a GitHub repo for further investigations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants