highcharts / highcharts-ios

iOS wrapper for Highcharts.
Other
127 stars 39 forks source link

Delete bundle File com.highcharts.charts.bundle, BlobRegistryFiles #454

Open KOSURUUDAYSAIKUMAR opened 2 days ago

KOSURUUDAYSAIKUMAR commented 2 days ago

func clearTemporaryDirectory() throws { let tempURL = URL(fileURLWithPath: NSTemporaryDirectory(), isDirectory: true) try FileManager.default.contentsOfDirectory(at: tempURL, includingPropertiesForKeys: nil) .forEach { fileURL in do { try FileManager.default.removeItem(at: fileURL) print("Deleted file: (fileURL.lastPathComponent)", #function) } catch { print("Error deleting file: (fileURL.lastPathComponent), error: (error)") } } } --- This code is used - When user logout - Delete all stored files locally. ---Deleted file: BlobRegistryFiles-aKP1n4rx Deleted file: BlobRegistryFiles-vt3e9dFB Deleted file: com.highcharts.charts.bundle Deleted file: WebKit

Code: func configurePieChart() { let options = HIOptions()

    let chart = HIChart()
    chart.type = "pie"
    chart.options3d = HIOptions3d()
    chart.options3d.enabled = true
    chart.options3d.alpha = 45
    chart.options3d.beta = 0
    options.chart = chart

    let title = HITitle()
    title.text = ""
    options.title = title

    let accessibility = HIAccessibility()
    accessibility.point = HIPoint()
    accessibility.point.valueSuffix = "%"
    options.accessibility = accessibility

    let tooltip = HITooltip()
    tooltip.pointFormat = "{series.name}: <b>{point.y:.2f}</b>"
    options.tooltip = tooltip

    let plotOptions = HIPlotOptions()
    plotOptions.pie = HIPie()
    plotOptions.pie.allowPointSelect = true
    plotOptions.pie.cursor = "pointer"
    plotOptions.pie.depth = 35

    let style = HICSSObject()
    style.fontSize = "10px" // Must include "px" for pixel values
    style.fontFamily = "Inter-Light"

    let dataLabels = HIDataLabels()
    dataLabels.enabled = true // False - No arrow no text message // True - Arrow with text message
    dataLabels.format = "{point.name}"
    dataLabels.style = style
    plotOptions.pie.dataLabels = [dataLabels]
    options.plotOptions = plotOptions

    let browserShare = HIPie()
    browserShare.name = "Count"

    let chromeData = HIData()
    chromeData.name = ""
    chromeData.y = 12.8
    chromeData.sliced = true
    chromeData.selected = true

// let chromeDataLabels = HIDataLabels() // dataLabels.enabled = true // True - Arrow with Text // False - Only color chromeData.dataLabels = [dataLabels]

    let exporting = HIExporting()
    exporting.enabled = false
    options.exporting = exporting

    let credits = HICredits()
    credits.enabled = false
    options.credits = credits

    plotOptions.pie.showInLegend = true

    browserShare.data = viewModel.pieModel
    options.series = [browserShare]
    pieChart.options = options
    pieChart.update(options, redraw: true)
    pieChart.redraw()

}

--- Called in View Did load.
MikolajMichalczak commented 2 days ago

Hi @KOSURUUDAYSAIKUMAR,

Could you please clarify what issue you’re experiencing? Is it related to the Highcharts library? Any additional details would help us understand how to assist you.

KOSURUUDAYSAIKUMAR commented 1 day ago

Hi, In Logout Scenario - I cleared all the Application Library support folder which stores our app information and Temporary files such as Local media and High chart framework. When User Sign In Scenario (Without Relaunch the app) - High chart is not visible, I wrote the code as HighChart.draw() and HighChart.update(options, true) and HIChartView.preload() --- Attached Screen shot for stored default framework in temporary app folder. Screenshot 2024-11-16 at 11 05 06 AM