Anychart 8 - Datetime value is getting rounded off in tooltip - anychart

I am facing this issue that when I hover on a point in anychart spline/colume graphs, then the crosshair label on x axis(datetime scale x axis) is showing me the rawvalue and i am able to format that to minutes format. But at same point, my tooltip is giving me x value with rounded off to hours only. Why its happening and how can we resolve it?

To avoid inaccurate date output, you could use text formatters, as shown below
var tooltip = chart.tooltip();
tooltip.title().text("Title");
chart.tooltip().format('{%x}{dateTimeFormat:d MMMM \'\'yy HH:mm}');
And in the sample here: https://playground.anychart.com/HPjfaiYh/2

Related

Plotting a SciChart series with a TimeSpan X-Axis when the plotted TimeSpan value is greater than 24 hours

I have a SciChart surface that is bound to an ObservableCollection<IRenderableSeriesViewModel> named TrendSeries. My DataSeries type is XyDataSeries<TimeSpan, double>.
My X-Axis is showing correctly when my timespan range is less than 24 hours. When I plot points that have a TimeSpan value of greater than 24 hours, the X-Axis (Time) incorrectly shows a range of 00:00:00 to 00:00:00.
How can I get my X-Axis to show correctly when I am plotting values with a TimeSpan greater than 24 hours?
<s:SciChartSurface RenderableSeries="{s:SeriesBinding TrendSeries}">
<!-- Define X Axis -->
<s:SciChartSurface.XAxis>
<s:TimeSpanAxis AxisTitle="Time"
AutoRange="Always" GrowBy="0.1, 0.1"
AxisAlignment="Bottom"/>
</s:SciChartSurface.XAxis>
<!-- Define Y Axis -->
<s:SciChartSurface.YAxis>
<s:NumericAxis AxisTitle="Value" AutoRange="Always" GrowBy="0.1, 0.1"/>
</s:SciChartSurface.YAxis>
</s:SciChartSurface>
this is a similar problem to this one: SciChart WPF Y-Axis and Data labels do hot have precision and show the same number
Essentially what you're seeing is the default TextFormatting on the TimeSpanAxis is set to "-hh:mm:ss"
Changing this to another .NET Formatting string, or dynamically changing it using the techniques presented in this answer will give you the desired behaviour

Custom X-axis label formatting in Winform Chart Control

I am plotting graph with numeric value on Y axis and Date time value on X axis in windows forms chart control. I am setting X axis scale "IsLogarithmic" to true and i am getting the graph as shown in the image ...
I want to set the label formatting of X axis in such a way that it shows me 10^1, 10^2, 10^3 and so on...
Any idea or help will be appreciated.

Victory Chart x-axis scale not working for Dates

I have an Area chart in Victory where the x-axis has dates.
I want to customize the x-axis Label and have created a CustomLabel component to calculate the x-axis scale and display "LABEL" below the ticks.
But for some reason, the scale is not calculated correctly for the Date Object.
Please let me know what I am doing wrong here.
Code here - https://codesandbox.io/s/3203z3n7r6
For anyone who may face this issue, I raised the issue in their Github Page and one of the authors has given a fix for it. Please see below:
https://github.com/FormidableLabs/victory/issues/1075

ExtJS : Column Chart with negative values display error

I am trying to display a column chart in ExtJS which contrains negative values.
I get this really strange wrong display :
All the values in the chart's store are negative and between -79 to -83. Yet the columns are displayed beneath the X axis. On the other hand these values are visible on the Y axis' range, so I am not sure what is the reason for that.
Someone got a clue?
No idea what ExtJS version you're using, but I found this question from back in the ExtJS 4 days and apparently inverting/reversing an axis was supported in ExtJS3 and then removed in ExtJS4. As I can not find any information about reversing/inverting an axis in recent Ext6 docs, this probably means you'll have to multiply your values by -1 and just keep your labels as is.
How to reverse an Axis in Sencha ExtJS Charts?

OxyPlot WPF- Find Y value from X-Axis value

I am trying to find Y-Axis value from X-Axis but so far no luck . My graph is plotted with 10-15 points with smooth curve set to true. Now what I need to locate is probable value of Y for any given x-value. Slimier to what occurs on click of graph (i think its nearest value displayed on tracker). Please note that I cant use tracker and click events. X-axis value will be provided from external input.
sample image
http://i.stack.imgur.com/jMwJo.png

Resources