Closed ruchiKumar14 closed 3 years ago
@KacperMadej , i have checked the demo that you shared , i want the same like how it is managed in the demo, when clicked on legends, then it displays the "No data display" when all legends are selected, but the demo you have shared is in Javascript, and i want to do the same in swift. So can you share me the piece of code that is in swift. As you can see in the video, i want to display "No data to display" when both the series i.e, "Benchmark" and "Actual" is clicked, but currently it is not happening.
Hello @ruchiKumar14,
did you add no-data-to-display
plugin?
chartView.plugins = ["no-data-to-display"]
Oh my god, Thank you so much @ihnatmoisieiev, it worked. I was trying it from so many days, and you gave me a one line code solution. Thanks a lot. The font is little bit small, can you help me with it. How can i increase the font size of "No data to display" text.
@ruchiKumar14 sure, just set up noData.style
object, eg.
let noData = HINoData()
noData.style = HICSSObject()
noData.style.fontSize = "25px"
options.noData = noData
Closing due to inactivity.
Hi @ruchiKumar14
The "No data to display" text should show when all series are hidden when the no-data-to-display module is loaded. Demo: https://jsfiddle.net/BlackLabel/bLgvktnx/1/ Toggle the series visibility by the legend item click and see the text.
If this doesn't help please share a minimal configuration required to recreate the problem.