Dimplejs Axis points to years - dimple.js

I have made a Ghost Bubbles Dimplejs chart as in http://dimplejs.org/advanced_examples_viewer.html?id=advanced_change_bubbles
My xaxis is years (2010 to 2015) Dimplejs by default specifies it as 2.0k How do i override it?
x = chart.addMeasureAxis("x", "Year");
x.timePeriod=d3.time.years;
x.overrideMin = 2009;
x.overrideMax = 2016;
Should I go for addTimeAxis?
My data has only years in the format yyyy.

The purest answer would be to change to a time axis but that would involve some additional changes to the logic. The simple answer to your actual question is to set the tick format before drawing:
x.tickFormat = "d";

Related

Postponing the plot to the following notebook cell [duplicate]

This question already has answers here:
How to overlay plots from different cells?
(1 answer)
How to add plot commands to a figure in more than one cell, but display it only in the end?
(1 answer)
Closed 4 years ago.
I'd like to have this code organization
# 1st cell showing my intentions
plt.plot(t, f(t))
(NO OUTPUT)
and
# 2nd cell with boring details
plt.xlabel(...)
...
plt.show()
(the plot with all the now interesting details)
because I plan to use the notebook to produce slides and/or pdf using an extension that allows to hide the input cell only, so that my reader sees only
what I want to show of my code ­— they can look at the notebook itself to see what's going on behind the scene…
I've tried plt.hold() but it's not what I had in mind…

Candle chart view in MPChart library zoom issue on android application

I have a requirement to plot the candle chart with 100 years worth of data, for the years 1920 to 2020. When I plot the graph using mp chart, it shows all 100 years of data on graph.
My requirement is to show the last 20 years of data (form 2001 to 2020) when rhw app launched. In addition, users should be able to scroll the graph from right to left to see remaining years of data on the graph.
I've used this code:
mChart.setVisibleXRange((mChart.getXChartMax()-mChart.getXChartMin())/3);
However, this divides the graph view in 3 parts and shows data from 1920 to 1956.
Please help me out with this problem.
Thanks in advance.
You need to specify the range after you setData(), invalidate() or notifyDataChangeSet()
mChart.setVisibleXRangeMaximum(20);
If you want to scroll the X to right you can use this:
mChart.moveViewToX(Integer.MAX_VALUE);

How do I avoid the first(and last) column of a x-capped chart being truncated?

I've been fiddling with a chart... I set the X axis minimum value to zero. Then I used DataBindXY on the Chart.Series.First.Points to set the values passing two lists (first is a 0-based label list and other has the actual values).
Below is the result. As I highlighted by the red arrow the first column is truncated.
Microsoft made traversing the settings of a chart in the designer as simple as getting out of a maze, so I'm clueless about where to find some offset property to be set.
Edit:
Mine could be a possible duplicate of this question, but its answer is not clear to me, so I asked a new one.
If you set the X axis minimum value to -0.5, that should solve it.
GraphChart.ChartAreas[0].AxisX.Minimum = -0.5;
or try something like:
GraphChart.ChartAreas[0].AxisX.IntervalOffset = 0.5;
The reason is that the columns width is approximately 0.8 depending on the chart configuration so in your case they might span from 0.4 to 1.4, with a center point in 1

Connect Xaxis of a chart to another one

I have an application made of a "main" chart with stock quotes plotted in it and a "subordinated" one with some indicators; the two charts are dinamically feeded with data so they are ever moving and re-sizing their own YAxis accordingly. The following snapshot gives a better idea:
What I would like to do is to make the below chart XAxis exactly the same of the first one, so that it is possible to follow the evolution of the two indicators together.
Right now I'm doing the following work around:
With ChartBelow.ChartAreas(0)
.AxisX.Minimum = ChartAbove.ChartAreas(0).AxisX.Minimum
.AxisX.Maximum = ChartAbove.ChartAreas(0).AxisX.Maximum
End With
However this doesn't work well since the digits of the YAxis on the main chart are not always the same of the second one (as in the example above where it's 6-digits against 3-only).
Is there any way to aligne the two y-axes or make the X-Axis shared between the two charts?
Yes, as well as setting the Min/Max values, also set the interval and label interval values of the Axis.
ChartAbove.ChartAreas(0).XAxis.Interval
ChartAbove.ChartAreas(0).XAxis.LabelStyle.Interval

Office.Interop.Excel How to get axis from series

I am using Microsoft.Office.Interop.Excel to create a chart. Some of my series in chart series collection are logarithmic, so I want to get hold of axis related a particular series, to set scale type to logarithmic.
Here is a way you could do it:
xlAxisValue = CType(xlChart.Axes(, Excel.XlAxisGroup.xlPrimary), Excel.Axes)
xlAxisValue.Item(Excel.XlAxisType.xlValue).ScaleType = Excel.XlScaleType.xlScaleLogarithmic
It is a generic example, if it is not working plese post your code.