OWC10 chart in gif format with pop-up values

M

Marina

I am creating OWC10 chart and writing it out as a gif.
I would like to get pop-up values over the columns.
yes, I do understand it's a gif but may be there is
some way to do it or do something similar like pop-ups.

Any help, suggestion or a good example will be greatly appreciated.

Thank you very much,
Marina

Below is my code for creating charts
================================================================
public void CreateChart(string chartTitle, string chartValues, string
chartType)
{
//int ChartHeight = 200;
//int ChartWidth = 200;

string Categories = "Buy,Sell";
string Values = chartValues;

OWC10.ChSeries DataSet;
OWC10.ChChart TheChart;

//add a chart to it
if (chartType.Equals("chart1"))
TheChart = myChartSpace1.Charts.Add(0);
else if (chartType.Equals("chart2"))
TheChart = myChartSpace2.Charts.Add(0);
else if (chartType.Equals("chart3"))
TheChart = myChartSpace3.Charts.Add(0);
else //(chartType.Equals("chart4"))
TheChart = myChartSpace4.Charts.Add(0);

//add a dataset to the chart
DataSet = TheChart.SeriesCollection.Add(0);

//name it
DataSet.SetData(OWC10.ChartDimensionsEnum.chDimSeriesNames, (int)
OWC10.ChartSpecialDataSourcesEnum.chDataLiteral, "Name");

//set the dataset plot type
DataSet.Type = OWC10.ChartChartTypeEnum.chChartTypeColumnStacked;

//populate it
DataSet.SetData(OWC10.ChartDimensionsEnum.chDimCategories, (int)
OWC10.ChartSpecialDataSourcesEnum.chDataLiteral, Categories);
DataSet.SetData(OWC10.ChartDimensionsEnum.chDimValues, (int)
OWC10.ChartSpecialDataSourcesEnum.chDataLiteral, Values);


//set the chart labels
TheChart.HasTitle = true;
TheChart.Title.Caption = chartTitle;
TheChart.Title.Font.Name = "Arial";
TheChart.Title.Font.Size = 8;
TheChart.Title.Font.Bold = true;

TheChart.Axes[0].HasTitle = false; //true;
//TheChart.Axes[0].Title.Caption = "Categories";
//TheChart.Axes[0].Title.Font.Name = "Verdana";
//TheChart.Axes[0].Title.Font.Size = 8;
/**********
TheChart.Axes[1].HasTitle = false; //true;
TheChart.Axes[1].Title.Caption = "Values";
TheChart.Axes[1].Title.Font.Name = "Verdana";
TheChart.Axes[1].Title.Font.Size = 8;
*********/
Response.Buffer = true;
Response.ContentType = "image/gif";

string ddd = Request.PhysicalApplicationPath.ToString();

if (chartType.Equals("chart1"))
{
myChartSpace1.ExportPicture(ddd + "xxx1.gif","gif", ChartWidth,
ChartHeight);
imgChart1.Visible=true;
}
else if (chartType.Equals("chart2"))
{
myChartSpace2.ExportPicture(ddd + "xxx2.gif","gif", ChartWidth,
ChartHeight);
imgChart2.Visible=true;
}
else if (chartType.Equals("chart3"))
{
myChartSpace3.ExportPicture(ddd + "xxx3.gif","gif", ChartWidth,
ChartHeight);
imgChart3.Visible=true;
}
else //if (chart.Equals("chart4"))
{
myChartSpace4.ExportPicture(ddd + "xxx4.gif","gif", ChartWidth,
ChartHeight);
imgChart4.Visible=true;
}
}
 
K

Kai Habel

Hi Marina,

as you a talking about GIF files there's no event handling
possible with static files.
You could:
- Generate a HTML document assembling your GIFs having
AREAs applied to each IMG object handling the mouseOver
events (which probably would cause a huge amount of time
to generate)
- Use the available properties of the chart object to
display the Series Values on your chart prior to exporting
( which might be the most simple way ).
 
M

Marina

Hi Kai,
thank you very much for your response.
I like your second suggestion.
It is more simple.

Thanks,
Marina
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top