Jump to content
Software FX Community

AndreG

Staff
  • Posts

    333
  • Joined

  • Last visited

Posts posted by AndreG

  1.  That is because your initial value is not a multiple of your step. There a 2 ways to get around this (that I can think of). The first would be to set your step to .5. Then you would also get 10.5 and 11.5. If that is not the desired outcome, you might have to use custom steps.

     

    chart1.AxisX.Min = 9.5;chart1.AxisX.Max = 12;chart1.AxisX.LabelsFormat.Decimals = 1;double[] myStep = { .5, 1, 1 };chart1.AxisX.CustomSteps = myStep;

    Note that custom steps will start over when the array is finished. So if you set your max to 13, you will need to add a "1" to the array. Otherwise the axis will take another "half step".

  2. When the chart is exported, it's DPI will depend on the resolution of the screen of the server exporting it. To insure a constant DPI (or even increase it for better looking charts), you can use the Paint method. Here is the sample code for that (here saving the bitmap as WMF, but you can use whatever format is supported).

    Rectangle r = new Rectangle (0, 0, (chart1.Width * 300) / 96, (chart1.Height * 300) / 96); Bitmap bmp = new Bitmap (r.Width, r.Height); bmp.SetResolution(300, 300); Graphics g = Graphics .FromImage(bmp); chart1.Paint(g, r, PaintStyles .Background | PaintStyles .Border | PaintStyles .Print); bmp.Save(@"c:\temp\cfx.wmf", ImageFormat.Wmf);g.Dispose(); bmp.Dispose();

  3. Please don't post your Serial Number on this or any other forums. It is confidential.

    Also, it seems you forgot the image.

    Try a page with nothing but a chart in it. Does the chart still shows up weird? If so, you may need to download the latest service pack.

    Regarding the message on the bottom of your chart, it only reflects what it sees in your license. You might need to reinstall the product and make sure you use the same Serial Number you just made public, using the Production install (if this is your production server). If its your development box, than its ok. The same message will not show up on your server.

  4. No idea whats going on there. Would it be possible for you to create a sample project that grabs data from a access database for instance and post it here? You could even just modify the passing data sample that comes with Chart FX 7 (C:\Program Files\Chart FX 7\Help and Samples\Sample Applications\Windows Forms\VS2005\PassingData) to reproduce this issue with chart (I would leave the grid out of this sample since there seems to be no issue with it).

  5. There is a lot of information about this on your Resource Center, under Gallery Types/Surface and Contour. Basically the series determines the depth (or Z axis).

    So basically if you only have two series your chart is not going to be really deep. I believe you can control that accessing the 3D class though.

    Does that help? If not, post your data and a better description (even a mockup screenshot) of your chart. Not sure what you mean by lenght of the chart since that word would only apply to a line, or a vector (you could say height, width or depth).

  6. Hi

    i am using chatfx7 on VS 2005.

    I have Y values range from 5000 to 6000 .

    By default, In the chart, it is showing the values from 1000 to 6000.

    I want to display the values from 5000 to 6000.

    Please let me know the solution.

    Thanks in Advance.

    If I understand you correctly, then all u need to do is set the Max and Min properties on the AxisY.

     

  7. Did you try the code I posted? Each line would represent a series.

    Suppose you have the following data, representing the productivity score of 4 employees throught the year:

    Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec

    34, 67, 53, 58, 97, 78, 96, 54, 47, 27, 69, 79

    97, 83, 23, 11, 28, 26, 84, 5, 93, 52, 95, 84

    54, 35, 24, 79, 39, 39, 73, 7, 64, 57, 24, 2

    44, 32, 26, 58, 63, 67, 27, 29, 17, 17, 69, 62

    As you can see, each row represents an employee. Each column represents a month. So if you would like to put that in a chart you might use 4 series (one for each employee) and 12 points (one for each month). That way you would have 4 lines, one for each employee. Kinda like what you get when u run the code I posted before.

    Thats the most basic concept of series. Now, different galleries use series in a different way. For instance a bubble chart (not supported by the Lite version) would use the first series for position of bubble and second series for size of bubble. A pie chart would draw one pie per series (althought I think more than one pie is not possible in the Lite version). Sorry for all the information that might not apply to your product, but I think it would help you grasp the concept.

    I hope this helps.

  8. You can't really have a "Date Axis" in this version of Chart FX (again a Lite limitation that is possible in other versions). I made you a very simple sample of what you can do, I hope it solves some of your questions. Also, if you do find you need more functionality, take a look at this website. It shows a comparison between the product you are currently using and our other versions of Chart FX (mouse over topics to reveal details).

    http://www.softwarefx.com/WhyUpgrade/comparison.aspx

     ---

    Dim r As New Random

    Dim month(12) As String

    month(0) = "Jan"

    month(1) = "Feb"

    month(2) = "Mar"

    month(3) = "Apr"

    month(4) = "May"

    month(5) = "Jun"

    month(6) = "Jul"

    month(7) = "Aug"

    month(8) = "Sep"

    month(9) = "Oct"

    month(10) = "Nov"

    month(11) = "Dec"

    Chart1.Gallery = SoftwareFX.ChartFX.Lite.Gallery.Lines

    Dim iSeries As Integer

    Dim iPoint As Integer

    ' Pass Values

    Chart1.OpenData(SoftwareFX.ChartFX.Lite.COD.Values, 4, 12) ' 4 series (in this case 4 lines), 12 points

    For iSeries = 0 To 3

     For iPoint = 0 To 11

    Chart1.Value(iSeries, iPoint) = r.Next(0, 100)

     Next iPoint

    Next iSeries

    Chart1.CloseData(SoftwareFX.ChartFX.Lite.COD.Values)

    ' Create the labels for X axis

    Dim i As Integer

    For i = 0 To 12

     Chart1.Legend(i) = month(i)

    Next i

    ---

     AndreG

  9. I tried to reproduce your code, but I dont really know what your data looks like. But one thing I noticed is that you call OpenData saying you will have 4 series, but you never add data beyond series index 0. Also, are you trying to add more than one point on the same series on the same tickmark? Because that is only possible using X values, which Chart FX Lite does not support. Any other version of Chart FX does.

    ---

    AndreG

  10. Does it only happen with one of your users? Zoom is supposed to work as many times and you do it, and it is working for me. Make sure you are using the latest Service Pack, create a new project with nothing but a chart on it (you can use the same configuration you posted above). Does it work then?

     ---

    Andre G

  11. Whenever you set MultipleColors to true, the legendbox displays the Axis X Labels. So I think you get the desired effects just by doing that.

    DataTable table1 = new DataTable("Test");

    table1.Columns.Add(

    "FruitGroup", System.Type.GetType("System.String"));table1.Columns.Add("Count", System.Type.GetType("System.Double"));

    table1.Rows.Add(

    new object[] { "Apples", 10 });table1.Rows.Add(new object[] { "Grapes", 2 });

    chart1.DataSourceSettings.Fields.Add(

    new FieldMap("FruitGroup", FieldUsage.Label));chart1.DataSourceSettings.Fields.Add(new FieldMap("Count", FieldUsage.Value));

    chart1.DataSource = table1;

    chart1.Gallery =
    Gallery.Bar;

    chart1.AllSeries.MultipleColors =

    true;

     

    ---

    Andre G

  12.  There are three ways I can think of.

    1. If you are using PSS, you can control how long those files stay on disk. Look for Disk Sliding Time on the following KB article. http://support.softwarefx.com/ShowArticle.aspx?Type=KB&Product=CfxNet70&Source=http://support.softwarefx.com/kb/762/1/004.htm

    2. Using SfxRemove.exe. Look for this file inside the Util folder. In command line, run it without any parameters for more instructions.

    3. You can create a service yourself that deletes every file inside that folder periodically.

  13. The issue is in the sample. It will be fixed on the release of next Service Pack. To apply the fix manually, please replace the following block of code (line 52):

      chart1.DataSourceSettings.Fields.Add(new FieldMap("Date",FieldUsage.XValue));

      chart1.DataSourceSettings.Fields.Add(new FieldMap("High",FieldUsage.Value));

      chart1.DataSourceSettings.Fields.Add(new FieldMap("Low",FieldUsage.Value));

      chart1.DataSourceSettings.Fields.Add(new FieldMap("Close",FieldUsage.Value));

    by:

      chart1.DataSourceSettings.Fields.Add(new FieldMap("Date",FieldUsage.XValue));

      chart1.DataSourceSettings.Fields.Add(new FieldMap("Low",FieldUsage.Value));

      chart1.DataSourceSettings.Fields.Add(new FieldMap("Close",FieldUsage.Value));

      chart1.DataSourceSettings.Fields.Add(new FieldMap("High",FieldUsage.Value));

    The right way to pass data to a HighLowClose chart is to pass Low to series 0, Close to series 1 and High to series 2.

    Regards,

    AndreG

  14. Its working for me. Could this be related to your environment? I found one interesting thing while looking for the decimal equivalent of Wingding chars. If I looked at the following page in FF, I see << for 171. If I visited the same page on IE, I see the star. Hope this info helps.

    http://www.alanwood.net/demos/wingdings.html

    Here is my test code. Screenshot attached.

      Dim i As Integer

      Dim j As Integer

     

      i = 0

      j = 0

     

      chart1.OpenDataEx COD_VALUES, 1, 10

      Do While (i < 1)

      Do While (j < 10)

      chart1.ValueEx(i, j) = Rnd * 100

      j = j + 1

      Loop

      i = i + 1

      Loop

      chart1.CloseData COD_VALUES

     

      chart1.Gallery = SCATTER

     

      chart1.Series(0).MarkerShape = -171

     

      chart1.MarkerSize = 10

  15. Only one set of OHLC bars can be plot per chart.

    My mistake. Here is a sample code of how you can plot two sets of OHLC bars. Note the format I have:

    Series 0 - Open for first set of bars

    Series 1 - High for first set of bars

    Series 2 - Low for first set of bars

    Series 3 - Close for first set of bars

    Series 4 - Open for second set of bars.... and so on.

     

    DataTable table1 = new DataTable("Test");table1.Columns.Add("Value1", System.Type.GetType("System.Double"));

    table1.Columns.Add(

    "Value2", System.Type.GetType("System.Double"));table1.Columns.Add("Value3", System.Type.GetType("System.Double"));

    table1.Columns.Add(

    "Value4", System.Type.GetType("System.Double"));table1.Columns.Add("Value5", System.Type.GetType("System.Double"));

    table1.Columns.Add(

    "Value6", System.Type.GetType("System.Double"));table1.Columns.Add("Value7", System.Type.GetType("System.Double"));

    table1.Columns.Add(

    "Value8", System.Type.GetType("System.Double"));table1.Rows.Add(new object[] { 1, 4, 8, 10, 2, 5, 7, 9 });

    table1.Rows.Add(

    new object[] { 2, 5, 7, 9, 1, 4, 8, 10 });table1.Rows.Add(new object[] { 1, 2, 3, 4, 3, 7 ,10 ,11 });

    chart1.DataSourceSettings.Fields.Add(

    new FieldMap("Value1", FieldUsage.Value));chart1.DataSourceSettings.Fields.Add(new FieldMap("Value2", FieldUsage.Value));

    chart1.DataSourceSettings.Fields.Add(

    new FieldMap("Value3", FieldUsage.Value));chart1.DataSourceSettings.Fields.Add(new FieldMap("Value4", FieldUsage.Value));

    chart1.DataSourceSettings.Fields.Add(

    new FieldMap("Value5", FieldUsage.Value));chart1.DataSourceSettings.Fields.Add(new FieldMap("Value6", FieldUsage.Value));

    chart1.DataSourceSettings.Fields.Add(

    new FieldMap("Value7", FieldUsage.Value));chart1.DataSourceSettings.Fields.Add(new FieldMap("Value8", FieldUsage.Value));

    chart1.DataSource = table1;

    chart1.Gallery =
    Gallery.OpenHighLowClose;

    chart1.LegendBox.Visible =

    false;

     

    Regards,

    AndreG

  16. As mentioned on the API documentation, the property picture of the series object applies only to 2D bars. Have you tried used Wingding characters? From the API:

    You can extend the point types available by setting this property to an integer representing the negative ASCII code from any font. By default, Chart FX uses the Windings font table to handle additional point types. For changing the default font, use the PointFont property.

    I hope this helps.

     Regards,

    AndreG

×
×
  • Create New...