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

Outdated documentation for custom SCIXySeriesTooltip #9

Open
justingiffard-impact opened this issue Sep 18, 2024 · 0 comments
Open

Comments

@justingiffard-impact
Copy link

In the docs and examples (both in https://github.com/ABTSoftware/SciChart.iOS.Documentation and https://github.com/ABTSoftware/SciChart.iOS.Examples) there are references to

private class FirstCustomSeriesInfoProvider: SCIDefaultXySeriesInfoProvider {
    class FirstCustomXySeriesTooltip: SCIXySeriesTooltip {
        override func internalUpdate(with seriesInfo: SCIXySeriesInfo!) {
            var string = NSString.empty;
            string += "X: \(seriesInfo.formattedXValue.rawString!)\n"
            string += "Y: \(seriesInfo.formattedXValue.rawString!)\n"
            if let seriesName = seriesInfo.seriesName {
                string += "\(seriesName)\n"
            }
            string += "Rollover Modifier"
            self.text = string;

            setTooltipBackground(0xffe2460c);
            setTooltipStroke(0xffff4500);
            setTooltipTextColor(0xffffffff);
        }
    }

    override func getSeriesTooltipInternal(with seriesInfo: SCIXySeriesInfo!, modifierType: AnyClass!) -> ISCISeriesTooltip! {
        if (modifierType == SCIRolloverModifier.self) {
            return FirstCustomXySeriesTooltip(seriesInfo: seriesInfo)
        } else {
            return super.getSeriesTooltipInternal(with: seriesInfo, modifierType: modifierType)
        }
    }
}

I get the Method does not override any method from its superclass for both internalUpdate(with seriesInfo: SCIXySeriesInfo!) and getSeriesTooltipInternal(with seriesInfo: SCIXySeriesInfo!, modifierType: AnyClass!) -> ISCISeriesTooltip!

changing

getSeriesTooltipInternal(with seriesInfo: SCIXySeriesInfo!, modifierType: AnyClass!) -> ISCISeriesTooltip!

to

getSeriesTooltip(_ modifierType: AnyClass) -> any ISCISeriesTooltip

seems to clear the the second one but the first one I cannot seem to figure out what the replacement would be, I did come across
update(at xyCoordinate: CGPoint, withUpdateAction updateAction: @escaping SCIUpdateSeriesTooltipAction) and update(_ hitTestInfo: SCIHitTestInfo, interpolate: Bool) Im assuming I should be using the first one but not 100% sure. Im just trial and erroring it at the moment

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

1 participant