Skip to content

Outdated documentation for custom SCIXySeriesTooltip #9

@justingiffard-impact

Description

@justingiffard-impact

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions