Print Page | Close Window

Chart colors

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Chart Control
Forum Description: Topics Related to Codejock Chart Control
URL: http://forum.codejock.com/forum_posts.asp?TID=18126
Printed Date: 24 November 2024 at 6:23am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Chart colors
Posted By: Developerx
Subject: Chart colors
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net