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

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

Open
KOSURUUDAYSAIKUMAR opened this issue Nov 14, 2024 · 3 comments

Comments

@KOSURUUDAYSAIKUMAR
Copy link

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
Copy link
Contributor

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
Copy link
Author

KOSURUUDAYSAIKUMAR commented Nov 16, 2024

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

@MikolajMichalczak
Copy link
Contributor

It seems the issue might be related to removing files that are essential for the Highcharts framework to function properly. Deleting these files from the app’s temporary or library support folders without fully reinitializing the framework could cause the described behavior.

Highcharts requires certain resources to operate, and manual deletion of these files may lead to unexpected issues. If you are clearing temporary files during logout, please ensure the framework is fully reloaded during the login process to restore its functionality.

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