H
Hans Riis
Hi.
I'm trying to create a bar chart with another series of data
represented as a line. I get my data from MS SQL. I create the chart
Frontpage and add dropdown menus i JavaScript to control the chart
component for people with little IT understanding.
For this first chart I'm looking for a way to combine bars and lines
using the same scale (in another chart I'll need to have separate
axes). I Haven't gotten as far as the combo part yet.
I hope somebody can help me out!
This bit of JavaScript code works for just changing one measure on the
y-axis:
function Sel_Field()
{
c=ChartSpace1.Constants;
ChartSpace1.PlotAllAggregates = 1;
ChartSpace1.HasPlotDetails = true;
ChartSpace1.PlotAllAggregates = c.chPlotAggregatesSeries;
ChartSpace1.SetData(c.chDimValues, c.chDataBound, "");
ChartSpace1.SetData(c.chDimValues, c.chDataBound, "BarVar");
}
This doesn't work as a replacement of the last line above:
ChartSpace1.SetData(c.chDimValues, c.chDataBound,
Array("BarVar","LineVar"));
I also tried VBScript but that didn't help much:
<SCRIPT language=VBScript>
set c=ChartSpace1.Constants
ChartSpace1.PlotAllAggregates = 1;
ChartSpace1.HasPlotDetails = true;
ChartSpace1.PlotAllAggregates = c.chPlotAggregatesSeries
ChartSpace1.SetData c.chDimValues, c.chDataBound, ""
ChartSpace1.SetData c.chDimValues, c.chDataBound,
Array("BarVar","LineVar")
</SCRIPT>
Thanks in advance, Hans Riis (Denmark)
I'm trying to create a bar chart with another series of data
represented as a line. I get my data from MS SQL. I create the chart
Frontpage and add dropdown menus i JavaScript to control the chart
component for people with little IT understanding.
For this first chart I'm looking for a way to combine bars and lines
using the same scale (in another chart I'll need to have separate
axes). I Haven't gotten as far as the combo part yet.
I hope somebody can help me out!
This bit of JavaScript code works for just changing one measure on the
y-axis:
function Sel_Field()
{
c=ChartSpace1.Constants;
ChartSpace1.PlotAllAggregates = 1;
ChartSpace1.HasPlotDetails = true;
ChartSpace1.PlotAllAggregates = c.chPlotAggregatesSeries;
ChartSpace1.SetData(c.chDimValues, c.chDataBound, "");
ChartSpace1.SetData(c.chDimValues, c.chDataBound, "BarVar");
}
This doesn't work as a replacement of the last line above:
ChartSpace1.SetData(c.chDimValues, c.chDataBound,
Array("BarVar","LineVar"));
I also tried VBScript but that didn't help much:
<SCRIPT language=VBScript>
set c=ChartSpace1.Constants
ChartSpace1.PlotAllAggregates = 1;
ChartSpace1.HasPlotDetails = true;
ChartSpace1.PlotAllAggregates = c.chPlotAggregatesSeries
ChartSpace1.SetData c.chDimValues, c.chDataBound, ""
ChartSpace1.SetData c.chDimValues, c.chDataBound,
Array("BarVar","LineVar")
</SCRIPT>
Thanks in advance, Hans Riis (Denmark)