stock chart on mobile, hard to hover the last series point with finger - mobile

To see the problem, try accessing the last data point on the multi-series stock demo with a mobile device. My hit rate is less than 50% on the last point on a series (finger hovering)
I tried setting margin-right and spacing-right but no help. The problem is that the last data point is on the edge of the plotting area so it is harder to access with finger. Is it possible to add some padding on the x-axis so that it is easier to hover the last data point?
Thanks!

You can use minPadding / maxPadding parameters http://api.highcharts.com/highcharts#xAxis.minPadding / http://api.highcharts.com/highcharts#xAxis.maxPadding

Related

SSRS bar chart issue

I am trying to add one box and one line on x-axis. Please look at below bar chart.
I tried using stripline but I cannot set height for stripline. It goes till 100.
Is there any way I can do this?
Unfortunately, SSRS doesn't provide the functionality you're looking for. A stripline is the closest you can get to that, but like you said, you can't control its height. The only way you could simulate this behavior would be to use a Background Image for your stripline, but that may be more work than it's worth. It would require a lot of manual adjustment to get the image to line up on the chart.
I would add a series to the chart using the Stock chart (under Range). In the Series Properties I would set the High value to the height desired for your line (~52 in your example). Ideally this would come from a dataset value.
Set the Low, Open and Close values to 0.
Try two Stripe Lines. First, create the strip line which represents the vertical value you're after. In my case, I made one that was 50% of the graph height off of the Y-Axis.
Chart Properties:
Height of StripeLine:
Once the stripe line is the correct height for the chart, create a 'mask' stripe line along the X-axis that will cover the portion of the Y-axis line you want hidden.
Chart Propterites:
Width of Stripe Mask:
Using these methods, and some really clever expression writing, you should be able to make the line exactly as high, and as wide as you desire.

Efficiently display multiple markers on WPF image

I need to display many markers on a WPF image. The markers can be lines, circles, squares, etc. and there can be several hundreds of them.
Both the image source and the markers data are updated every few seconds. The markers are associated with specific pixels on the image and their size should be absolute in relation to the screen (i.e. when I move the image the markers should move along with it, but if i zoom in, they should take the same space of the screen as before).
Currently, I've implemented this using the AdornerLayer. This solution has several problems but the most significant one is that the UI doesn't fare well under the load even for 120 such markers.
I wanted to ask what would be the best way to go about implementing this? I thought of two solutions:
Inherit from Canvas and make sure it is invalidated not for every
added marker but for a range of markers at once
Create a control that holds an image and change its OnDraw to draw all the markers
I would appreciate some pointers from someone with experience with a similar problem.
Your use case looks quite specialized, so a specialized solution seems in order. I'd try a variant of your second option — extend Image, overriding its OnRender method.

ExtJS 4 Chart - Change axes, series, and store

I have a chart that will show energy generation over a day, month, or year, depending on the user's selection. To do this on a single chart, I need to be able to change the axes, series, and store when a button is clicked. I have managed to get this working, except I have the issue of the old data, series, and axes are still showing, and the new ones are just being laid on top. Is there a way to clear or refresh/redraw a chart? Or should I just split this into 3 charts, and hide/show the charts on button click?
Here is my current code for setting axes, series and store on the fly.
chart.axes.clear();
chart.axes.addAll(dailyAxes);
chart.series.clear();
chart.series.addAll(dailySeries);
chart.bindStore(Ext.data.StoreManager.lookup('dailyEnergy'));
A little late, but what's missing is this:
chart.surface.removeAll()
This isn't ideal, as you may get a flash of empty space as it destroys the previous elements, but it does avoid the hangover of old data.
i dont know what type of chart or what is dailyAxes
but i assume u want to change axes properties..hee is an example on how to do it:
Ext.getCmp('chartid').axes.get("gauge").maximum = 100;
then u need to redraw the chart after ur done:
Ext.getCmp('chartid').redraw();

Show two polygons (wrap them) at low zoom, when showing more than one complete earth

How can I wrap shapes around the world, so that a shape is shown more than once at low zoom?
Example:
I draw a polygon over USA.
I zoom out so that I can see two USA's.
I only see one polygon: ( I want to see two!
The map data effectively has 2 USAs. That implies you should actually want 2 polygons, one of which will be hidden most of the time.
Might as well cater for the worst case and treat a single USA as the exception rather than the rule.
You can't.
As others have already pointed out, the fact that, at far zoom levels certain features get repeated on either side of the map is an unwanted but inevitable side-effect of a projected surface that enables continuous scrolling. This has only been an issue in recent versions of the Bing Maps control - the earlier v6.x control prevented the map from panning across the 180th meridian.
I cannot think of any possible reason why you'd ever want to show two USAs, let alone target data to be positioned on each one. So the solution is to modify either the zoom level at which the map is displayed, or the size of the application window in which it is being displayed so that this situation doesn't occur.

MultiScaleImage Zoom Particular Areas

I am trying to create a Deep Zoom based multiscale image that essentially has 2 views. Initially it will display a large map of the world. When the user click the USA the image should then zoom into the USA. Clicking an external button should zoom the image back out. Thats it. I don't want panning or additional zooming.
What I don't understand is how to define a "hit area" around the USA that zooms it in. Can anyone provided links to resources that explain how to do this... I never seem to find exactly what I am after?
Thanks in advance.
I can't remember the code exactly.
But if you generate a project with the source code in Deepzoom composer and then take a look at the source code.
Right down the bottom of the the Deepzoom code is a function for zooming into a LogicalPoint.
Convert the top left point of the image you are zooming into a logical point. Set this as your ViewportOrigin as this will put it in the top left.
http://blogs.msdn.com/jaimer/archive/2008/06/23/working-with-collections-in-deep-zoom.aspx This post here explains the ViewportOrigin quite well. Just remember that everything is related to the Width.
You will also need to set the the ViewportWidth.
When the ViewportWidth = 1 the whole image is displayed so it will be a fraction of the total width of the image. (USA width / WorldMap Width)
Hope this makes sense.

Resources