Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1300
Nice ultrachart time vs data
posted

I need to convince my management that we can do very nice plots using infragistics, up to know this is what I have:



In order have that here is my code :


            //Set the chart titles
            ChartPureAlpha.Text = TickerName;
   

            //Set Chart legend
            this.ChartPureAlpha.Legend.Visible = true;
            this.ChartPureAlpha.Legend.Location = LegendLocation.Right;
            this.ChartPureAlpha.Legend.Margins.Left = 5;
            this.ChartPureAlpha.Legend.Margins.Right = 10;
            this.ChartPureAlpha.Legend.Margins.Top = 15;
            this.ChartPureAlpha.Legend.Margins.Bottom = 90;
            this.ChartPureAlpha.Legend.SpanPercentage = 15;

            this.ChartPureAlpha.LineChart.TreatDateTimeAsString = false;
            this.ChartPureAlpha.ChartType = ChartType.ScatterChart;
            this.ChartPureAlpha.ScatterChart.ConnectWithLines = true;
            //ChartPureAlpha.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
            this.ChartPureAlpha.Axis.X.Labels.ItemFormatString = "<ITEM_LABEL:dd-MM-yyyy>";
            this.ChartPureAlpha.Axis.X.Labels.SeriesLabels.Font = new System.Drawing.Font("Verdana", 25);
            this.ChartPureAlpha.Axis.X.Labels.SeriesLabels.Visible = true;
            this.ChartPureAlpha.Axis.X.Labels.SeriesLabels.OrientationAngle = 315;

            //ChartPureAlpha.Axis.X.TickmarkInterval = 1;
            //ChartPureAlpha.Axis.X.TickmarkIntervalType = AxisIntervalType.Days;
            //ChartPureAlpha.Axis.X.TickmarkStyle = AxisTickStyle.DataInterval;
            // axis label
            //ChartPureAlpha.TitleBottom.Text = "Date";
            //ChartPureAlpha.TitleBottom.HorizontalAlign = StringAlignment.Center;
            //ChartPureAlpha.TitleLeft.Text = "Raw Alpha)";
            //ChartPureAlpha.TitleLeft.HorizontalAlign = StringAlignment.Center;

           
            // Create and add series
            ChartPureAlpha.Series.Add(dowjones);


I want to know how to :

- reduce marker size
- have the whole date (not truncated)
- change the label font

Thanks for your help

Parents
  • 53790
    posted

    eltorfuerte said:
    reduce marker size

    Maybe one possible approach to achieve this behavior could be:

    LineAppearance la = new LineAppearance(ultraChart1);

    la.IconAppearance.Icon = SymbolIcon.Circle;

    la.IconAppearance.IconSize = SymbolIconSize.Large;

    la.LineStyle.EndStyle = LineCapStyle.DiamondAnchor;

    LineChartAppearance dd = new LineChartAppearance();

    dd.LineAppearances.Add(la);

    myColumnLayer.ChartTypeAppearance = dd;

     

     

    eltorfuerte said:
    have the whole date (not truncated)

    Maybe you could use the property Extend of your Axis. Please take a look at the attached sample for more details.

    eltorfuerte said:
    change the label font

     You could try to change it using the code

    myColumnLayer.AxisY.Labels.Font = new System.Drawing.Font("Ariel", 10);

    myColumnLayer.AxisY.Labels.FontColor = Color.Red;

    Please take a look at the attached sample for more details. Please let me know if you have any questions.

    Regards

    CompositeLineChart_7.zip
Reply Children