P
phoenix.cbe
Hello all,
I would like to add a dynamic image map to an image that I create
using OWC11. For example I have created a pie chart and I want to add a
hyperlink to the various sections of the chart. Has anyone done that?
This is what I have done
on the .aspx page i have defined the image(imgDataChart) and on the
..aspx.cs this is the code
OWC11.ChartSpaceClass oChartSpace = new OWC11.ChartSpaceClass ();
OWC11.ChartChartTypeEnum chartType;
chartType = ChartChartTypeEnum.chChartTypePie;
oChartSpace.HasChartSpaceLegend = true;
oChartSpace.ChartSpaceLegend.Position =
ChartLegendPositionEnum.chLegendPositionBottom;
oChartSpace.Border.Color = "white";
oChartSpace.Charts.Add(0);
oChartSpace.Charts[0].HasTitle = true;
oChartSpace.Charts[0].Type = chartType;
oChartSpace.Charts[0].ChartDepth = 125;
oChartSpace.Charts[0].AspectRatio = 80;
oChartSpace.Charts[0].Title.Caption = "Number of Cases";
oChartSpace.Charts[0].Title.Font.Bold = true;
oChartSpace.Charts[0].SeriesCollection.Add(0);
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection.Add ();
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasPercentage
= true;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasValue
= false;
//
------------------------------------------------------------------------
// Pick your favorite image format
//
------------------------------------------------------------------------
byte[] byteArr = (byte[]) oChartSpace.GetPicture ("gif", 400, 400);
//
------------------------------------------------------------------------
// Store the chart image in Session to be picked up by an HttpHandler
later
//
------------------------------------------------------------------------
HttpContext ctx = HttpContext.Current;
string chartID = Guid.NewGuid ().ToString ();
ctx.Session [chartID] = byteArr;
imgDataChart.ImageUrl = string.Concat ("chart.ashx?", chartID);
GetPicture returns a byte array and can we identify the regions for
this image and make an imagemap out of this.
Thanks
Raj
I would like to add a dynamic image map to an image that I create
using OWC11. For example I have created a pie chart and I want to add a
hyperlink to the various sections of the chart. Has anyone done that?
This is what I have done
on the .aspx page i have defined the image(imgDataChart) and on the
..aspx.cs this is the code
OWC11.ChartSpaceClass oChartSpace = new OWC11.ChartSpaceClass ();
OWC11.ChartChartTypeEnum chartType;
chartType = ChartChartTypeEnum.chChartTypePie;
oChartSpace.HasChartSpaceLegend = true;
oChartSpace.ChartSpaceLegend.Position =
ChartLegendPositionEnum.chLegendPositionBottom;
oChartSpace.Border.Color = "white";
oChartSpace.Charts.Add(0);
oChartSpace.Charts[0].HasTitle = true;
oChartSpace.Charts[0].Type = chartType;
oChartSpace.Charts[0].ChartDepth = 125;
oChartSpace.Charts[0].AspectRatio = 80;
oChartSpace.Charts[0].Title.Caption = "Number of Cases";
oChartSpace.Charts[0].Title.Font.Bold = true;
oChartSpace.Charts[0].SeriesCollection.Add(0);
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection.Add ();
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasPercentage
= true;
oChartSpace.Charts[0].SeriesCollection[0].DataLabelsCollection[0].HasValue
= false;
//
------------------------------------------------------------------------
// Pick your favorite image format
//
------------------------------------------------------------------------
byte[] byteArr = (byte[]) oChartSpace.GetPicture ("gif", 400, 400);
//
------------------------------------------------------------------------
// Store the chart image in Session to be picked up by an HttpHandler
later
//
------------------------------------------------------------------------
HttpContext ctx = HttpContext.Current;
string chartID = Guid.NewGuid ().ToString ();
ctx.Session [chartID] = byteArr;
imgDataChart.ImageUrl = string.Concat ("chart.ashx?", chartID);
GetPicture returns a byte array and can we identify the regions for
this image and make an imagemap out of this.
Thanks
Raj