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

Image annotation not showing on windows phone? #2

Open
objorke opened this issue Jun 18, 2017 · 0 comments
Open

Image annotation not showing on windows phone? #2

objorke opened this issue Jun 18, 2017 · 0 comments

Comments

@objorke
Copy link
Member

objorke commented Jun 18, 2017

From oxyplot: oxyplot/oxyplot#965

Adding image annotation not showing on windows phone.

what i try :

OxyImage imageAdd;
            OxyImage imageDelete;

            var assembly = typeof(TssDashboard).GetTypeInfo().Assembly;
            //var str = this.GetType().AssemblyQualifiedName;
            using (var stream = assembly.GetManifestResourceStream("Test.Resources.OKLA.png"))
            {
                imageAdd = new OxyImage(stream);
            }
            using (var stream = assembly.GetManifestResourceStream("Test.Resources.DeleteLA.png"))
            {
                imageDelete = new OxyImage(stream);
            }
            //// Relative to plot area, above top/left corner, 20pt high
            model.Annotations.Add(new OxyPlot.Annotations.ImageAnnotation
            {
                ImageSource = imageAdd,
                X = new PlotLength(DateTimeAxis.ToDouble(DictVarData.ElementAt(DictVarData.Count -50 ).Name), PlotLengthUnit.Data),
                Y = new PlotLength(980, PlotLengthUnit.Data),
                Width= new PlotLength(44, PlotLengthUnit.ScreenUnits),
                HorizontalAlignment = OxyPlot.HorizontalAlignment.Center,
                VerticalAlignment = OxyPlot.VerticalAlignment.Top,
            });
model.InvalidatePlot(true);

code execution not showing image on chart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant