Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Chart Control
  New Posts New Posts RSS Feed - Chart legend in report control
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Chart legend in report control

 Post Reply Post Reply
Author
Message
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Topic: Chart legend in report control
    Posted: 27 September 2010 at 11:10am
Hi,

how can I draw the legend markers in the report control?
See mock up below.

Andre




Codejock support
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 28 September 2010 at 1:10am
Hi,

Can use markup:

<Page xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
  <Grid Width='19' Height='11'>  
    <Line Stroke='#b26c00' X2='19' Y1='5' Y2='5'/>
    <Ellipse Width='11' Height='11' Fill='Red' Stroke='#824900'>
      <Ellipse.Fill>
        <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
          <GradientStop Color="#dd8a00" Offset="0"/>
          <GradientStop Color="#c97b00" Offset="1"/>
        </LinearGradientBrush>
      </Ellipse.Fill>
    </Ellipse>
  </Grid>
</Page>
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 28 September 2010 at 6:52am
Thanks Oleg.

Is it possible to get the markup from the legend items and pass it to the report control?

Could you add a method to the chart control where I pass the marker type, size and color and get the markup in return?

marker.GetMarkup(type, size, color);

Codejock support
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 28 September 2010 at 5:33pm
Originally posted by oleg oleg wrote:

Hi,

Can use markup:

<Page xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation' xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
  <Grid Width='19' Height='11'>  
    <Line Stroke='#b26c00' X2='19' Y1='5' Y2='5'/>
    <Ellipse Width='11' Height='11' Fill='Red' Stroke='#824900'>
      <Ellipse.Fill>
        <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
          <GradientStop Color="#dd8a00" Offset="0"/>
          <GradientStop Color="#c97b00" Offset="1"/>
        </LinearGradientBrush>
      </Ellipse.Fill>
    </Ellipse>
  </Grid>
</Page>


Hello Oleg,

how do you calculate the gradient colors at runtime?

Andre

Codejock support
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 29 September 2010 at 1:21am
Hi,


GetContent()->GetAppearance()->GetPalette()->GetColor(m_pSeries->GetPaletteIndex());
GetContent()->GetAppearance()->GetPalette()->GetColor2(m_pSeries->GetPaletteIndex());

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.