You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.
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.
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 chromeDataLabels = HIDataLabels()
// dataLabels.enabled = true // True - Arrow with Text // False - Only color
chromeData.dataLabels = [dataLabels]
The text was updated successfully, but these errors were encountered: