Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Chart Control
  New Posts New Posts RSS Feed - Chart colors
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Chart colors

 Post Reply Post Reply
Author
Message
Developerx View Drop Down
Groupie
Groupie


Joined: 03 March 2011
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote Developerx Quote  Post ReplyReply Direct Link To This Post Topic: Chart colors
    Posted: 28 March 2011 at 5:03am
Hi,

i love the chart control but some things like cridline color is not easy to set?

how to set color or gridlines (Chart), i did not find any documentation or examples

' i can set visible but not color
diagram.AxisX.GridLines.Visible = checkgridx
 diagram.AxisY.GridLines.Visible = checkgridy
 'color ??
 
so plan B, setappearance
B) How to use the setapparance function, the built in black works in the demos !

how to create a new black with red gridlines??

i open chart builder utility and save the apperance black (as black2.xml)


black2.xml (same values as black (just gridines color is changed)


<?xml version="1.0" encoding="UTF-8"?>
<Appearance CompactMode="1">
    <Content BackgroundColor="0, 0, 0" BorderColor="0, 0, 0">
        <ChartTitle TextColor="248, 248, 248"/>
        <Legend TextColor="248, 248, 248" BackgroundColor="0, 0, 0" BorderColor="0, 0, 0"/>
    </Content>
    <Diagram2D BackgroundColor="51, 51, 51" BackgroundColor2="0, 0, 0" BorderColor="128, 128, 128">
        <Axis Color="150, 150, 150" InterlacedColor="77, 77, 77" InterlacedColor2="0, 0, 0">
            <GridLines Color="255, 0, 0" MinorColor="77, 77, 77"/>
            <AxisLabel TextColor="248, 248, 248"/>
            <AxisTitle TextColor="248, 248, 248"/>
            <ConstantLine Color="0, 0, 0" TextColor="248, 248, 248"/>
            <Strip Color="0, 0, 0"/>
        </Axis>
    </Diagram2D>
    <SeriesStyle>
        <Label BackgroundColor="255, 255, 255" TextColor="255, 255, 255" BorderColor="255, 255, 255" ConnectorColor="255, 255, 255"/>
    </SeriesStyle>
    <FinanceSeriesStyle UpColor="250, 250, 250" DownColor="200, 0, 0"/>
    <PieSeriesStyle BorderColor="0, 0, 0"/>
</Appearance>


-------------
so now i just want to load and set appearance, but i dont work?
how to setappearance from xml file?

Private Sub Command5_Click()
Dim PropExchange As PropExchange
    Set PropExchange = ChartControlGlobalSettings.CreatePropExchange
    PropExchange.CreateAsXML True, "Content"
    PropExchange.LoadFromFile ("f:\black2.xml")
   
    ' this destroy chart
    ' ChartControl.Content.DoPropExchange PropExchange
  
   ' nothing happens
    ChartControl.Content.Appearance.LoadAppearance PropExchange
    ChartControl.Content.Appearance.SetAppearance "PropExchange"
    
   
  'ok
  '  ChartControl.Content.Appearance.SetAppearance "Black"
End Sub


Regards
Developerx
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.164 seconds.