Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

WebChart.Dll

Posted on 2006-11-03
1
Medium Priority
?
1,234 Views
Last Modified: 2008-01-09
hello, im using wecharts by www.carlosag.net

i need to know if there is a way to adjust Legend's height?

im using this code. the legend is way too tall


Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim wcEng As New ChartEngine
        wcEng.Size = New Size(500, 350)
        Dim wcCharts As New ChartCollection(wcEng)
        wcEng.Charts = wcCharts
        wcEng.HasChartLegend = true
        wcEng.Legend.Position = LegendPosition.Bottom
        Dim slChart As New LineChart()
        slChart.Line.Color = Color.Red
        slChart.Legend = "Watts"
        slChart.ShowLineMarkers = False
        slChart.ShowLegend = True
        slChart.Data.Add(New ChartPoint("One", 12))
        slChart.Data.Add(New ChartPoint("Two", 22))
        slChart.Data.Add(New ChartPoint("Three", 2))
        wcCharts.Add(slChart)
        SetMoreProperties(wcEng,"Sell v. Buy","Period","Price ($)")
        Dim bmp As Bitmap
        Dim memStream As New System.IO.MemoryStream
        bmp = wcEng.GetBitmap()
        bmp.Save(memStream, System.Drawing.Imaging.ImageFormat.Png)
        memStream.WriteTo(Response.OutputStream)
        Response.ContentType = "image/png"
        Response.End()
        ' End If
    End Sub


    Private Sub SetMoreProperties(ByVal engine As ChartEngine,byval Title as string,byVal XTitle as string,byval YTitle as string)
        Dim myFont As New System.Drawing.Font("Tahoma", 9,FontStyle.Bold)
        engine.XTitle = New ChartText
        Dim horizontalFormat As New StringFormat
        horizontalFormat.LineAlignment = StringAlignment.Center
        horizontalFormat.Alignment = StringAlignment.Center
        engine.XTitle.StringFormat = horizontalFormat
        engine.XTitle.Text = XTitle
        engine.XTitle.Font = myFont

        ' Set-up the YTitle
        engine.YTitle = New ChartText
        engine.YTitle.Font = myFont
        Dim verticalFormat As New StringFormat
        verticalFormat.FormatFlags = StringFormatFlags.DirectionVertical
        verticalFormat.Alignment = StringAlignment.Center
        verticalFormat.LineAlignment = StringAlignment.Center
        engine.YTitle.StringFormat = verticalFormat
        engine.YTitle.Text = YTitle

        ' Set-up the Title
        engine.Title = New ChartText
        engine.Title.Text = Title
        engine.Title.Font = myFont
       

        ' Specify show XValues
        engine.ShowXValues = True
        engine.ShowYValues = True

        ' Some padding
        engine.Padding = 10
        engine.ChartPadding = 35

        ' some color
        engine.Background.Color = Color.FromArgb(70, Color.DarkBlue)

        ' some color
        engine.PlotBackground.Color = Color.LightYellow
    End Sub
0
Comment
Question by:dynamicrevolutions
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 10

Accepted Solution

by:
Kinger247 earned 2000 total points
ID: 17865112
Looks like the legends size is in camparison to the size of the control.

If it doesn't do what you intend can you know search for another ?

Mind you, other charting controls I've used in the past work in a simliar way.
Don't know if anyone else can point out one where the legend size can be amended...
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question