Multiple charts with the same X Axis - teechart

I have three charts placed on top of each other and I would like them to all use the one X Axis. How can I acheive this?

You have two options:
The best option is using a single chart with 3 custom axis (or 1 standard and 2 custom axis) with different positioning for each one to define each series area. Custom axes are only supported in the Professional versions of TeeChart. Demos and tutorials about this functionality are inclued with both the registered and fully functional evaluation version.
Hide the bottom axis of the top charts and eliminate panel margins, back walls and titles so there's no gap between charts.
For example:
uses Series;
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=False;
Chart2.View3D:=False;
Chart1.AddSeries(TLineSeries.Create(Self)).FillSampleValues;
Chart2.AddSeries(TLineSeries.Create(Self)).FillSampleValues;
Chart1.Axes.Bottom.Visible:=False;
Chart1.MarginBottom:=0;
Chart1.Walls.Back.Visible:=False;
Chart2.Title.Visible:=False;
Chart2.MarginTop:=0;
Chart2.Walls.Back.Visible:=False;
Chart2.Axes.Bottom.Grid.Visible:=False;
end;

Related

Can I add a moving scale or axis in plots using Vegalite?

I am trying to add a movable scale or axis inside a plot. For instance: in this example of stacked plot: Click-to-view
I want to include a movable y-axis scale so, if we hover the graph and put the mouse pointer on the beginning of the orange color of any bar, the a-xis will begin from that bar. (Specifically, moving x=0 line.)
I meant something like this example (of d3).
https://observablehq.com/#d3/index-chart
But, here I want to change the value of x-axis by moving the line. Is it possible to do it using vegalite? If somebody has any similar example in vegalite, can you refer it?
Thank you!
AFAIK, there is no animation in Vega Lite. However, you may check out Gemini which aims to extend the grammar of data viz to some simple animations of single-view Vega/Vega-Lite charts

d3.js v4 how to set brush programmatically

I am building a version of this parallel coordinate view in d3.js v4.
https://bl.ocks.org/syntagmatic/05a5b0897a48890133beb59c815bd953
In my example I have a predefined selection (in the form of a [min,max] array that I would like to set programatically as a brush in one or more of the axes, after the plot has loaded. But I cannot seem to find a way to do it. Most examples I found on setting a brush from code are using d3 v3 and use setting extent but that does not work anymore in v4 it seems.
can someone give me some tips and a simple example hot to do this in this case (so with multiple axes and brushes active) ?
thanks
Select your brush group and call brush.move, then also pass an array with the start and end coordinates. Your brush move event will then take care of the rest.
d3.select(".brush").call(brush.move, [[startX, endX], [startY, endY]]);

can you add filterHandler for composite chart, dc.js?

I created a grouped-stacked composite chart using dc.js.
I am wondering if I can add a filterHandler to a composite chart.
I want to filter on each stacks.
It seems that, there is no straight forward way to build a composite chart and hook the parent chart to the volumeChart that would filter all the individual child components at once via dc.js, as Gordon suggested. I came up with a solution for one of my dashboards which is not so modular but works fine & also keep in mind the downsides to this approach pointed out below.
For the above dashboard to work, I defined 3 barCharts and 3 lineCharts overlaid on top the barCharts and chaining them all together linearly to volumeChart.
Although this works fine with a fixed y-axis scale, lineChart fails to align with the barCharts when the I set elasticY(true) on all of them, since the lineChart components seem to pic its own yMax and when I pass the yMax value as window.value from barCharts to the lineChart via .on('renderlet'..., again I fail to read these values due the misalignment of individual chart render times. And of course when I overlay the lineCharts I intrinsically loose/block the interaction with the barCharts and use the line moving average tooltips to view bar data.
I have not tried this yet but found a better way to do the same from Scott Miller - https://stackoverflow.com/a/25188909/5743716
Hope it helps!

JFreechart two bar charts in one image but not superimposed

i would like to generate two bar charts into 2 different plots. Why not something like this http://www.java2s.com/Code/Java/Chart/JFreeChartMultiplePieChartDemo1.htm but for bar chart instead of pie one.
I'm using ServletUtilities.saveChartAsPng() which takes as (first) argument the JFreeChart object, but i don't see how to create my JFreeChart object which must hold 2 bar charts / 2 plots (and a common legend, but this is not my main problem currently)
I googled a lot, but i did not find what i'm still looking for.
Thanks in advance for helping.
As suggested here, you can add an arbitrary number of ChartPanel instances to an enclosing panel. Override the panel's getPreferredSize() method, use a suitable layout and pack() the enclosing Window. Optionally, suppress the legend in all but one chart.

Extending chart functionality in SSRS

The default chart object in the SQL Server (2005) Business Intelligence Development Studio doesn't seem to some have formatting options like :
specifying the text direction of labels in the x and y axis
adding a trendline to a bar chart
arbitrarily resizing items in a chart - for example, if I resize the chart object, everything gets resized accordingly but I can't keep the size of the chart the same while extending the area of the legend for instance.
multiline chart labels
So what I want to know is
is there any easy answer to the formatting problems mentioned above?
what websites/books/resources/examples would you recommend I look
into for extending the functionality of the chart object?
Some colleagues of mine gave up on the stock control and bought Dundas charts
The stock charts are cut down versions of Dundas.
yes you can specify the text direction of labels in the x and y axis
Go to chart properties and in the tab x and y axis enter the chart title and in the title align use the combination like left/right/center align.
you can change the legend line go to the chart properties click legend tab inside this
there is an option for "display legend inside plot area" and you can include the trendline there
you can use multiline text labels when the text limits extends
I don't see how you can resize the legend, puting inside the plot area looks ugly for pie-chart
I'd recommend go with the dundas chart components gbn suggested.
If that's not possible at least this article should solve issue 1.

Resources