How to align correctly this SVG inside the Victory Scatter Graph - victory-charts

I have a problem with aligning the SVG component DataPointCircle inside the Victory Scatter Graph.
My main problem is not how it looks but how it acts.
the tooltip and the VictoryVoronoiContainer is acting weird when hovered over the data circles.
When the data circle is hovered it sometimes shows the tooltip sometimes not!, this is more clear on the last data point.
Since I had to do this x={x - 10} y={y - 10} to properly align the data points, I thought that maybe it is causing a distortion.
I need the tooltip and VictoryVoronoiContainer to act normal. I'm 100% if it is an aligning problem or if I need to do something else, suggestions would be lovely!.
Thanks in advance.
Here is a SandBox
https://codesandbox.io/s/YED2ql2mK

The answer was posted in github:
Yes, that [manually add offset props x={x - 10} y={y - 10}] would definitely be causing the issue. VictoryVoronoiContainer calculates the positions of all of your data points. If you move the points around manually, the triggers will no longer match up. I don't think this is something I can fix at the library level. It might be better to add the tooltips directly to VictoryScatter so that they will be attached to your custom point components regardless of how you you manually position them
https://github.com/FormidableLabs/victory/issues/695

Related

What TeeChart Tool can I use to Interactively select points from a FastLine Graph

While using Delphi Seattle 10 and Steema TeeChart Pro VCL FMX 2016.18, I am looking to Highlight a Selection of a Line Graph (multiple series) in the way that Zooming allows / makes a square around a highlighted selection of a Line Graph to indicate which part of it to zoom into (as long as the onmousedown action is in progress).
The purpose of this would be to allow the selection to remain highlighted while the mouse is no longer being clicked, to potentially "Delete" the highlighted Data points. All I need this for is to obtain the (X0 Y0 X1 Y1) values to possibly obtain the CalcPosPoint(X) and remove all the points inside. The data is currently obtained through a Record Struct (Memory Mapped) file, and it will there for be used to set/check for a property "deleted" to indicate on the next redraw of the graph which rows to completely ignore and which to continue printing.
I hope to be able to do this (select from 1 chart), and have it simultaneously draw on multiple graphs. I have tried to look for an example of this feature through the use of TSelectorTool (FMXTee). One of the pages I found referring to such a tool is Interactive data point selection as well as Multiple selections with Selector Tool
And my second question has to do with TeeCharts directly. Where would I find fmx240.bpl as TeeChart_Pro_Firemonkey_Demo.exe requires this file in order to run? I did manage to copy vcl240.bpl from "Embarcadero\Studio\18.0\bin" and put it into "Embarcadero\Studio\17.0\bin"
[Edited]
I have managed to capture / create a sample code (MVCE) from which I can now select a portion and create a square around a particular sample of graph lines.
The control graph right now is the bottom graph (Chart5). If anyone is interested in seeing the code, I have put up a pastebin sample.
PasteBin Sample Code
And a TeeCharts.tar.gz is accessible to anyone who wishes to see a sample of the code, as well as the data sample.
filetolink.com Source Files
I no longer feel the need for mathematical equation to differentiate the top graphs from the bottom (because the bottom axes are automatic where as the top are defined). I intend to only use the space which is adherent to the visible space, and do not intend to extend in either direction (left or right). That means at this point the size of the graph does not matter, because once I over populate the charts above, the position in the bottom graph would become irrelevant, and therefor I do not intend to use the bottom chart.
The next step is to save the positions of the boxes so that they can reappear when the graph is shift from left (past data) to the right (live data). And then uses the buttons above to make the appropriate action to the graphs.
I would like to know what way would be the most sufficient way to record the positions of the rectangles, so when the chart is shifted (via the ScrollBar1), the rectangles are moving with the direction of the scrollbar. But I'm sure I can achieve that.
I think I have found a solution. The red squares are only prevalent for the visual aspect, they can be drawn on, I don't need to do anything special with each chart, as I already know what the X0..Y1 parameters are, they are known from the initial chart. The problem h/e has to do with the initial chart. As long as the screens are all full, I can zoom in correctly w/ alignment with on all the charts (ZoomRect/Rectf(X0..Y1))
But what kind of equation would it take to adjust the charts that are not in the same zoom / max / min when the Chart5.Axes.Bottom.Automatic = True?
From there I just simply have to disable the immediate zoom feature, and allow buttons to become functional, to decide what the next course of action would be.

shinobi chart gridline end in data point instead of going all the way to the top of chart

I'm drawing a chart in an iOS app and I want the gridlines to start in the x axis but end in the data point instead of extending all the way up to the top.
Is this possible?
Thanks in advance.
NC
Disclaimer: I work for ShinobiControls
The shinobicharts framework doesn't currently support this as an out-of-the-box feature.
A workaround may exist though. You may be able to add your own gridline subviews by using the SChartAxis method pixelValueForDataValue: to work out where in the plot area coordinate space you should draw your vertical line up to for a given data point.
Once you have your coordinates there are various ways you could draw your gridlines:
Add a canvas view behind or in front of the chart (depending on what effect you want). Then use your coordinates to draw your gridlines using CoreGraphics or some other drawing technique.
Create individual UIViews that each represent a gridline using your coordinates and add these behind or in front of the chart.
One thing to be aware of with this technique is that the gridlines will not automatically update when you pan and zoom. In order to do this you will need to override one of the chart's delegate methods that notify you of range changes and update your drawn gridlines to match the new data point positions.
Another potential workaround could be to use a column series to mimic gridlines. If you create a column series and feed it the same data points as your original series this will result in columns that go up to the y-value of each data point. You could then use the property interSeriesSetPadding on SChartAxisStyle to cause the columns to appear very thin.
I hope that information is useful!

Coreplot: Axis Labels Fixed Location

I'm trying to customize a Coreplot graph in many ways I can and the next thing I would like to do is place the X Axis Labels (one that is custom as well) at the bottom of the graph, independent of the X axis' position (whether it's scrolled up or down).
To make it clear, it is similar to giving the labels an offset value of something like 50.0. But offset is not the property I'm looking for since it fixes the labels location relative to the X axis.
Any way this can be done? Or do I have to skip the axisLabels property and place and layer or something manually at the bottom of the graph?
EDIT: Alright, I managed to place an axis on the bottom with CPTConstraints. But it's not on the bottommost. If a plot point is on those levels, the plot line overlaps the labels. I tired padding of the graph but of course, it moves the whole graph, hence the issue persists.
Thanks in advance
Make a second x-axis. Have the first one draw the axis line, tick marks, etc., as normal but no labels. Label the second one and set all of the line style properties to nil so it doesn't draw any of the lines.
Turns out that aside from the graph, the plotAreaFrame property of the CPTGrpah also has paddings. If you give more paddings to plotAreaFrame than that of the graph, the plot will be drawn in a smaller frame and the rest of the graph area will be for you to add what you want (i.e., a second Axis).
Big thanks to #Eric, for trying to answer Every single CorePlot question as soon as possible.
CorePlot does have a lot of customisation than I thought.

Highcharts highstocks - candlestick graph has last value partially cut

In a candlestick graph i am building, the latest bar is cut-off partially such that even the bar is not visible. Thus it's difficult to judge the high and low by seeing the bar.
I'm unable to post a pic now but it's like the last rectangle being cut in half.
I'm tried a lot of options in the api but can't figure out why this is not showing correctly. The chart margin and axis offset options havent' helped. Is there a way i can set the series margin from the plot area so that it displays right.
For this problem, the best solution is to insert a dummy series which should be hidden from every aspect of the chart. So try this, insert a dummy series from the last point of the data series to some extra buffer(as per need). Then remove this series from the chart by explicitly removing it from the legends (using showinlegend),chart(setting linewidth to 0) and from tooltip by having a check in formatter. Hope this solves your problem.
I had the same problem and couldn't figure it out, because no matter how I changed the xAxis.maxPadding or changed the xAxis.max, it would always cut off the last candlestick when I clicked on the range selector.
To solve it, (hack) I just added an extra data point in my series and set it 1 day past the last day and set all values to null.
Without any code or a pic, it's hard to tell the problem, but it sounds like you need to use the max padding option. http://api.highcharts.com/highcharts#xAxis.maxPadding. You may also want to look at endOnTick as well as whether you are setting max on the axis.

CSS sprite position problem

I trying to create a fixed border to the site that dynamically change size with the browser window from this sprite (it isn't perfect I know.): http://fc07.deviantart.net/fs70/f/2011/269/7/0/bordersprite_by_nakos-d4ayzne.png
DEMO on jSFiddle
My problem as you can see is the vertical wall part. As the #falJ and #falB are height:100% they include the bottom wall's end too with the space between the two wall sprites. Is there a way to force backround-position to only use vertical wall part without bottom wall's end?
Thanks in advance.
Solution: http://jsfiddle.net/vonkly/Ld43B/
It's not the prettiest thing in the world, but it achieves what you want. Check out the source code & direct link for the background images to see what you'll need to do. It's currently set at 299px wide; I imagine you'll be using something wider.
I'd also suggest adding some padding around your content (either with a p tag, span, another div, etc.) - the way it is currently set up isn't what I'd recommend for readability.
EDIT
The only way I can imagine achieving a fluid width + height box with the borders that you have in the way that you want is to use a second image for the west and east containing divs. This should work with your current method.

Resources