diff --git a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/ChartAllDtoS.cs b/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/ChartAllDtoS.cs deleted file mode 100644 index 8aa13195..00000000 --- a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/ChartAllDtoS.cs +++ /dev/null @@ -1,1411 +0,0 @@ -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; - -namespace Kurs.Platform.Charts.Dto -{ - public class ChartCommonDto - { - /// Bağımsız değişken ekseni yakınlaştırılırken veya kaydırılırken değer ekseninin visualRange değerinin ayarlanıp ayarlanmadığını belirtir. - /// - public bool AdjustOnZoom { get; set; } = true; - /// Grafik kabının arka planını renklendirir. - /// Not: HiddenInput olarak etiketlenmesinin sebebi renk seçimi için farklı bir editör kullanılmasından dolayıdır - /// Default Value: '#FFFFFF' - /// - public string ContainerBackgroundColor { get; set; } = "#FFFFFF"; - /// Serileri ve öğelerini renklendirmek için kullanılacak paleti ayarlar. - /// Accepted Values: 'Bright' | 'Harmony Light' | 'Ocean' | 'Pastel' | 'Soft' | 'Soft Pastel' | 'Vintage' | 'Violet' | 'Carmine' | 'Dark Moon' | 'Dark Violet' | 'Green Mist' | 'Soft Blue' | 'Material' | 'Office' - /// Default Value: 'Material' - /// - public string Palette { get; set; } = "Material"; - /// Sayıları seri sayısından (Chart UI bileşeninde) veya bir serideki noktalardan (PieChart UI bileşeninde) az olduğunda, paletteki renklerle ne yapılacağını belirtir. - /// Accepted Values: 'alternate' | 'blend' | 'extrapolate' - /// Default Value: 'blend' - /// blend : İki komşu rengin bir karışımını oluşturur ve paletteki bu renklerin arasına ekler. - /// alternate : Sırayla normal, açık ve koyu tonlarını değiştirerek tüm palet renklerini tekrarlar. - /// extrapolate : Gölgelerini yavaş yavaş karanlıktan aydınlığa değiştirerek tüm palet renklerini tekrarlar. - /// - public string PaletteExtensionMode { get; set; } = "blend"; - - /// PanesDto dolu ise hangisinin default olduğunu belirleyen isimdir. PanesDto[0].name ismi - /// - public string DefaultPane { get; set; } - /// UI bileşeninin kullanıcı etkileşimine yanıt verip vermediğini belirtir. - /// - public bool Disabled { get; set; } - /// UI bileşeninin kullandığı temanın adını ayarlar. - /// Accepted Values: 'generic.dark' | 'generic.light' | 'generic.contrast' | 'generic.carmine' | 'generic.darkmoon' | 'generic.darkviolet' | 'generic.greenmist' | 'generic.softblue' | 'material.blue.light' | 'material.lime.light' | 'material.orange.light' | 'material.purple.light' | 'material.teal.light' - /// - public string Theme { get; set; } = "generic.light"; - - // diğer eklenebilecek property ler - - // autoHidePointMarkers - // barGroupPadding - // barGroupWidth - // customizeAnnotation - // customizeLabel - // customizePoint - // elementAttr - // maxBubbleSize - // minBubbleSize - // negativesAsZeroes - // pathModified - // pointSelectionMode - // redrawOnResize - // resizePanesOnZoom - // resolveLabelOverlapping - // rotated - // rtlEnabled - // seriesSelectionMode - // stickyHovering - // synchronizeMultiAxes - } - - public class ChartTitleDto - { - /// Başlığın metnini belirtir - /// - public string Text { get; set; } - /// Dikey hizalamanın konumunu belirtir - /// Accepted Values: 'bottom' | 'top' - /// - public string VerticalAlignment { get; set; } = "top"; - /// Yatay yönde hizalamanın yanaşıklık konumunu belirtir - /// Accepted Values: 'center' | 'left' | 'right' - /// - public string HorizontalAlignment { get; set; } = "center"; - /// UI bileşeninin altyazısını yapılandırır - /// İhtiyaç olması durumunda alt özellikleri ile birlikte Objeye çevrilebilir - /// - public string Subtitle { get; set; } - /// WordWrap uygulandıktan sonra başlık ayrılan alandan taştığında başlıkla ne yapılacağını belirtir: - /// gizleme, kısaltma ve bir üç nokta görüntüleme veya hiçbir şey. - /// Accepted Values: 'ellipsis' | 'hide' | 'none' - /// - public string TextOverflow { get; set; } = "ellipsis"; - /// Tek bir satıra sığmazsa başlığın nasıl kaydırılacağını belirtir. - /// Accepted Values: 'normal' | 'breakWord' | 'none' - /// "normal" Metin yalnızca izin verilen kesme noktalarında (örneğin, iki kelime arasındaki boşluk) kesiliyor. - /// "breakWord" Satırda kullanılabilir kesme noktası yoksa sözcükler bölünebilir. - /// "none" Sözcük kaydırma devre dışı. - /// - public string WordWrap { get; set; } - - //Eklenebilir diğer alanlar: object font, object subtitle, object margin - } - - - public class ChartArgumentAxisDto - { - public ChartArgumentAxisDto() - { - Grid = new ChartAxisGrid(); - Label = new ChartArgumentAxisLabelDto(); - } - - /// ArgumentAxis için Label sınıfı - /// https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxChart/Configuration/argumentAxis/label/ - /// - public class ChartArgumentAxisLabelDto - { - public ChartArgumentAxisLabelDto() { } - - /// Eksen etiketlerini döndürmenizi veya kademelendirmenizi sağlar. Yalnızca yatay eksen için geçerlidir. - /// Accepted Values: 'rotate' | 'stagger' | 'standard' - /// rotate : Eksen etiketlerini, rotateAngle özelliği tarafından belirtilen açı boyunca döndürür. - /// stagger: Eksen etiketlerini iki sıra halinde düzenler. Satırlar arasında boş bir alan, staggeringSpacing özelliği tarafından belirtilir. - /// standard:Eksen etiketlerinin varsayılan yerleşimini değiştirmez. - /// - public string DisplayMode { get; set; } = "standard"; - /// Eksen etiketlerinin dönüş açısını belirtir. Yalnızca displayMode veya overppingBehavior "rotate" ise geçerlidir. - /// - public int RotationAngle { get; set; } = 90; - /// Tümünü görüntülemek için yeterli alan olmadığında eksen etiketlerinin nasıl düzenleneceğine karar verir. - /// Accepted Values: 'rotate' | 'stagger' | 'none' | 'hide' - /// - public string OverlappingBehavior { get; set; } = "hide"; - } - - /// Bağımsız değişkenleri belirtilen bir veri türüne dönüştürür. - /// Accepted Values: 'datetime' | 'numeric' | 'string' - /// Default Value: undefined - /// Veri kaynağınız sayıları veya tarihleri ​​dizeler olarak saklıyorsa, bu özelliği kullanarak uygun veri türünü belirtin. Tarihlerin geçerli bir biçimi olduğundan emin olun. - /// - public string ArgumentType { get; set; } - /// Toplama aralıklarının uzunluğunu eksen birimleri cinsinden belirtir. Yalnızca sürekli ve logaritmik tipteki eksenler için geçerlidir. - /// Accepted Values: 'day' | 'hour' | 'millisecond' | 'minute' | 'month' | 'quarter' | 'second' | 'week' | 'year' - /// Default Value: undefined - /// Veri toplama için bağımsız değişken ekseni aralıklara bölünür. Aynı aralığa düşen seri noktaları bir araya toplanır. aggregationInterval özelliği, her aralığın uzunluğunu tanımlar. - /// nesne olarak da implement edilebilir, şimdilik yapılmadı. Örneğin 'day' seçildiğinde gün sayısı 5 olarak verilebilir - /// - public string AggregationInterval { get; set; } - public ChartAxisGrid Grid { get; set; } - /// Kullanıcı bir eksen etiketini işaret ettiğinde vurgulanacak grafik öğelerini belirtir. - /// Accepted Values: 'allArgumentPoints' | 'none' - /// Default Value: 'none' - /// none : Eksen etiketleri, onlara işaret etmeye yanıt vermez. - /// allArgumentPoints : Bir kullanıcı bağımsız değişken ekseninde bir etiketi işaret ettiğinde, karşılık gelen bağımsız değişkenin seri noktaları vurgulanır. - /// - public string HoverMode { get; set; } = "none"; - public ChartArgumentAxisLabelDto Label { get; set; } - /// Bağımsız değişken ekseninin yerini değiştirir. - /// Accepted Values: 'bottom' | 'left' | 'right' | 'top' - /// Default Value: 'bottom' - /// Döndürülen (Rotated) özelliğin değerine bağlı olarak, konum (Position) farklı değerler kabul eder. - /// If (Rotated = False) => Position = "bottom" or "top" - /// If (Rotated = True) => Position = "left" or "right" - /// - public string Position { get; set; } = "bottom"; - /// Eksen başlığını yapılandırır. - /// Şimdilik sadece string olaran implemen edildi, ihtiyaç olması durumunda ChartTitleDto benzeri bir nesne ile değiştirilebilir - /// - public string Title { get; set; } - /// Eksen çizgisini görünür yapar. - /// - public bool Visible { get; set; } = true; - /// Eksen çizgisinin genişliğini piksel cinsinden belirtir. - /// - public int Width { get; set; } = 1; - /// Eksen üzerinde yalnızca iş günlerini bırakır: çalışma haftası günleri artı tek iş günleri eksi tatiller. Yalnızca eksenin argümanTürü "tarihsaat" ise geçerlidir. - /// - public bool WorkdaysOnly { get; set; } - - // ihtiyaç olunca açılacak proptert ler - - // aggregateByCategory - // aggregatedPointsPosition - // aggregationGroupWidth - // allowDecimals - // axisDivisionFactor // İki komşu ana çizgi arasındaki minimum mesafeyi piksel cinsinden belirtir. Yalnızca "sürekli" ve "logaritmik" tiplerin eksenleri için geçerlidir. - // breaks[] - // breakStyle - // categories - // color - // constantLines[] - // constantLineStyle - // customPosition - // customPositionAxis - // holidays - // inverted - // linearThreshold - // logarithmBase - // maxValueMargin - // minorGrid - // minorTick - // minorTickCount - // minorTickInterval - // minValueMargin - // minVisualRangeLength - // offset - // opecity - // placeholderSize - // singleWorkdays - // strips[] - // stripStyle - // tick - // tickInterval - // type - // valueMarginsEnabled - // visualRange - // visualRangeUpdateMode - // wholeRange - // workWeek - - } - - /// Değer eksenini yapılandırır. - /// - public class ChartValueAxisDto - { - public ChartValueAxisDto() - { - Grid = new ChartAxisGrid(); - BreakStyle = new BreakStyleDto(); - Breaks = new List(); - Breaks.Add(new BreakDto()); - Breaks.Add(new BreakDto()); - } - - public ChartAxisGrid Grid { get; set; } - /// Değer ekseninin adını belirtir. - /// - public string Name { get; set; } - /// Bağımsız değişken ekseninin yerini değiştirir. - /// Accepted Values: 'bottom' | 'left' | 'right' | 'top' - /// Default Value: 'left' - /// Döndürülen (Rotated) özelliğin değerine bağlı olarak, konum (Position) farklı değerler kabul eder. - /// If (Rotated = False) => Position = "left" or "right" - /// If (Rotated = True) => Position = "bottom" or "top" - /// - public string Position { get; set; } = "left"; - /// Eksen başlığını yapılandırır. - /// Şimdilik sadece string olaran implemen edildi, ihtiyaç olması durumunda ChartTitleDto benzeri bir nesne ile değiştirilebilir - /// - public string Title { get; set; } - /// Değerleri belirtilen bir veri türüne dönüştürür. - /// Accepted Values: 'datetime' | 'numeric' | 'string' - /// Default Value: undefined - /// Veri kaynağınız sayıları veya tarihleri ​​dizeler olarak saklıyorsa, bu özelliği kullanarak uygun veri türünü belirtin. Tarihlerin geçerli bir biçimi olduğundan emin olun. - /// - public string ValueType { get; set; } = "numeric"; - /// Eksen çizgisini görünür yapar. - /// - public bool Visible { get; set; } = true; - /// Eksen çizgisinin genişliğini piksel cinsinden belirtir. - /// - public int Width { get; set; } = 1; - - public List Breaks { get; set; } - public BreakStyleDto BreakStyle { get; set; } - /// Değer ekseninin türünü belirtir. - /// Accepted Values: 'continuous' | 'discrete' | 'logarithmic' - /// continuous : Sayısal ve tarih-saat değerlerini görüntüler. Bu ekseni aralıklara bölmek için tickInterval özelliğini kullanın. - /// discrete : "Kategoriler" adı verilen dize değerlerini görüntüler. Bunları sıralamak için, kategoriler dizisini kullanın. - /// logarithmic : Sayısal değerleri görüntüler. Her değer, bir kuvvete yükseltilmiş logaritmaTemel değeridir. Örneğin, 10'a eşit olan logaritmaTemel şu değerleri üretir: 10-2, 10-1, 100, 101, 102, vb. Logaritmik eksen, hızla büyüyen değerlerden oluşan bir veri kümesini görselleştirdiğinizde kullanışlıdır. - /// - public string Type { get; set; } - public bool AutoBreaksEnabled { get; set; } = true; - public int MaxAutoBreakCount { get; set; } = 2; - - // ihtiyaç olunca açılacak property ler - - // aggregatedPointsPosition - // allowDecimals - // axisDivisionFactor - // categories - // color - // constantLines[] - // constantLineStyle - // customPosition - // discreteAxisDivisionMode - // endOnTick - // inverted - // label - // linearThreshold - // logarithmBase - // maxValueMargin - // minorGrid - // minorTick - // minorTickCount - // minorTickInterval - // minValueMargin - // minVisualRangeLength - // multipleAxesSpacing - // offset - // opacity - // pane - // placeholderSize - // showZero - // strips[] - // stripStyle - // synchronizedValue - // tick - // tickInterval - // valueMarginsEnabled - // visualRange - // visualRangeUpdateMode - // wholeRange - } - - public class ChartSizeDto - { - public bool UseSize { get; set; } = false; - /// UI bileşeninin genişliğini piksel cinsinden belirtir - /// - public int Width { get; set; } = 400; - /// UI bileşeninin yüksekliğini piksel cinsinden belirtir - /// - public int Height { get; set; } = 200; - } - - public class ChartLegendDto - { - public ChartLegendDto() - { - Border = new ChartBorderDto(); - } - - /// Legend in arka planını renklendirir - /// Default Value: undefined - /// Bu özellik aşağıdaki renkleri destekler: - /// Hexadecimal colors - /// RGB colors - /// RGBA colors - /// Predefined/cross-browser color names - /// Predefined SVG colors - /// Paint server address - /// - public string BackgroundColor { get; set; } - /// Legend in kenarlığını yapılandırır - /// - public ChartBorderDto Border { get; set; } - public int ColumnCount { get; set; } - /// Gösterge öğelerini dikey (bir sütunda) veya yatay (bir satırda) olarak düzenler. legend.horizontalAlignment "center" ise varsayılan değer "horizontal" olur. Aksi takdirde, "dikey" dir - /// Accepted Values: 'horizontal' | 'vertical' - /// - public string Orientation { get; set; } = "vertical"; - /// Göstergenin grafiğin çiziminin dışında mı yoksa içinde mi bulunduğunu belirtir - /// Accepted Values: 'inside' | 'outside' - /// - public string Position { get; set; } = "outside"; - /// Gösterge öğelerini birkaç sıra halinde düzenler. - /// - public int RowCount { get; set; } = 0; - /// Açıklama başlığını yapılandırır - /// ihtiyaç olması durumunda detaylandırmak için TitleDto ile değiştirilebilir - /// - public string Title { get; set; } - /// Göstergenin görünürlüğünü belirtir - /// - public bool Visible { get; set; } = true; - - ////İhtiyaç olması durumunda açılacak diğer property ler - - ///// horizontalAlignment ile birlikte göstergenin konumunu belirtir - ///// Accepted Values: 'bottom' | 'top' - ///// - //public string VerticalAlignment { get; set; } = "top"; - //public int RowItemSpacing { get; set; } = 8; - //public int PaddingTopBottom { get; set; } = 10; - //public int PaddingLeftRight { get; set; } = 10; - //public string MarkerTemplate { get; set; } - //public string MarkerSize { get; set; } - //public string MarkerRender { get; set; } - //public string MarkerComponent { get; set; } - //public string Margin { get; set; } - //public string ItemTextPosition { get; set; } - //public string ItemsAlignment { get; set; } - //public string HoverMode { get; set; } - //public string HorizontalAlignment { get; set; } - //public string CustomizeText { get; set; } - //public string CustomizeItems { get; set; } - //public string CustomizeHint { get; set; } - ///// Öğe sütunları arasında piksel cinsinden boş bir alan belirtir - ///// - //public int ColumnItemSpacing { get; set; } = 20; - - } - - public class ChartBorderDto - { - /// Legend in kenarlığını renklendirir. - /// Bu özellik aşağıdaki renkleri destekler: - /// Hexadecimal colors - /// RGB colors - /// RGBA colors - /// Predefined/cross-browser color names - /// Predefined SVG colors - /// Paint server address - /// - public string Color { get; set; } = "#d3d3d3"; - /// Legend in tüm köşelerini yuvarlatır. - /// - [Range(0, 100, ErrorMessage = "Value for {0} must be between {1} and {2}.")] - public int CornerRadius { get; set; } = 0; - /// Açıklamanın kenarlığı için bir tire stili ayarlar - /// Accepted Values: 'dash' | 'dot' | 'longDash' | 'solid' - /// Default Value: 'solid' - /// solid : Kenarlık düz, sürekli bir çizgidir - /// longDash : Kenarlık, uzun çizgiler kullanılarak görüntülenir - /// dash : Kenarlık, tireler kullanılarak görüntülenir - /// dot : Kenarlık noktalar kullanılarak görüntülenir - /// Any combination of 'longDash', 'dash' and 'dot : Kenarlık, belirtilen kombinasyon tekrarlanarak görüntülenir. Örneğin, 'dashdotdash'. - /// - public string DashStyle { get; set; } = "solid"; - ///// Açıklamanın kenarlığının saydamlığını belirtir - ///// Bu özellik, 0 ile 1 arasında bir değer kabul eder; burada 0, kenarlığı tamamen saydam, 1 ise opak yapar. - ///// - //[Range(0.1, 1, ErrorMessage = "Value for {0} must be between {1} and {2}.")] - //public double Opacity { get; set; } = 0.5; - public bool Visible { get; set; } - /// Açıklamanın kenarlığının genişliğini piksel cinsinden belirtir - /// - public int Width { get; set; } = 1; - } - - /// Bölme, dizi içeren bir grafik alanıdır. Bir grafikte çok sayıda seri varsa, bunlar birden çok bölme arasında dağıtılabilir. - /// - public class ChartPanesDto - { - /// Bölmenin arka planının rengini belirtir. - /// - public string BackgroundColor { get; set; } - /// Çok bölmeli bir grafikte bölmenin yüksekliğini (veya grafik döndürüldüğünde genişliğini) belirtir. - /// - public int Height { get; set; } = 250; - /// Bölmenin adını belirtir. - /// - public string Name { get; set; } - - //public PaneBorderDto Border { get; set; } - - } - - /// Uyarlanabilir düzen özelliklerini belirtir. - /// Şu sırada gizlenir: Title, Export menu icon, Legend, Axis titles, Axis labels - /// - public class ChartAdaptivelayoutDto - { - /// Düzenin uyum sağlamaya başladığı minimum kap yüksekliğini belirtir. - /// - public int Height { get; set; } = 80; - /// Düzenin uyum sağlamaya başladığı minimum kapsayıcı genişliğini belirtir. - /// - public int Width { get; set; } = 80; - /// UI bileşeni düzeni uyarladığında nokta etiketlerinin tutulması gerekip gerekmediğini belirtir. - /// - public bool KeepLabels { get; set; } = true; - } - - public class ChartSeriesDto - { - /// Hangi veri kaynağı alanının seri noktaları için bağımsız değişkenler sağladığını belirtir - /// Default Value: 'arg' - /// Temalar ile kullanılamaz! - /// - public string ArgumentField { get; set; } = "arg"; - /// Seriyi bir değer eksenine bağlar. - /// - public string Axis { get; set; } - /// Aynı bağımsız değişkene sahip çubukların üst üste binmesi için çubuk serilerini gruplandırmanıza izin verir. - /// Bu üye şu seriler tarafından kullanılır: BarSeries, RangeBarSeries - /// - public string BarOverlapGroup { get; set; } - /// Göreli birimleri kullanarak bir serideki tüm çubukların dolgusunu ve dolayısıyla genişliğini kontrol eder. barWidth özelliği ayarlanmışsa yoksayılır. - /// Bu üye şu seriler tarafından kullanılır: BarSeries, StackedBarSeries, FullStackedBarSeries, RangeBarSeries - /// - public int BarPadding { get; set; } - /// Bir dizideki tüm çubuklar için piksel cinsinden ölçülen sabit bir genişlik belirtir. barPadding özelliğine göre önceliklidir. - /// Bu üye şu seriler tarafından kullanılır: BarSeries, StackedBarSeries, FullStackedBarSeries, RangeBarSeries - /// - public int BarWidth { get; set; } - /// Serinin rengini belirtir. - /// Not: HiddenInput olarak etiketlenmesinin sebebi renk seçimi için farklı bir editör kullanılmasından dolayıdır - /// Bu özellik aşağıdaki renkleri destekler: - /// Hexadecimal colors - /// RGB colors - /// RGBA colors - /// Predefined/cross-browser color names - /// Predefined SVG colors - /// Paint server address - /// - public string Color { get; set; } - /// Çubukların yuvarlak görünmesini sağlar. Yalnızca çubuk benzeri seriler için geçerlidir. - /// Default Value: 0 - /// Bu üye şu seriler tarafından kullanılır: BarSeries, StackedBarSeries, FullStackedBarSeries, RangeBarSeries - /// - public int CornerRadius { get; set; } = 0; - /// Açıklamanın kenarlığı için bir tire stili ayarlar - /// Accepted Values: 'dash' | 'dot' | 'longDash' | 'solid' - /// Default Value: 'solid' - /// solid : Kenarlık düz, sürekli bir çizgidir - /// longDash : Kenarlık, uzun çizgiler kullanılarak görüntülenir - /// dash : Kenarlık, tireler kullanılarak görüntülenir - /// dot : Kenarlık noktalar kullanılarak görüntülenir - /// Any combination of 'longDash', 'dash' and 'dot : Kenarlık, belirtilen kombinasyon tekrarlanarak görüntülenir. Örneğin, 'dashdotdash'. - /// - public string DashStyle { get; set; } = "solid"; - /// Serinin boş veri noktalarını göz ardı edip etmeyeceğini belirtir. - /// Boş değere sahip veri noktaları, gerçek seri noktaları üretmez. Bu nedenle eksik olması gereken yerlerde gereksiz boşluklarla seriler çizilebilir. Bu boşlukları kaldırmak için, ignoreEmptyPoints özelliğini true olarak ayarlayın. - /// - public bool IgnoreEmptyPoints { get; set; } = false; - - /// Seriyi tanımlayan adı belirtir. - /// - public string Name { get; set; } - /// Serinin hangi bölmeye ait olması gerektiğini belirtir. Bölmenin adını kabul eder. - /// Bilgilendirme: Pane dolu ise chart ın PanesDto Property si aynı isimde bir elemanı mutlaka içermelidir - /// - public string Pane { get; set; } - /// rangeValue2Field özelliğiyle birleştiğinde, hangi veri kaynağı alanının aralık benzeri bir seri için değerler sağladığını belirtir. - /// Bu üye aşağıdaki seriler tarafından kullanılır: - /// RangeBarSeries, RangeAreaSeries - /// - public string RangeValue1Field { get; set; } = "val1"; - /// rangeValue1Field özelliğiyle birleştiğinde, hangi veri kaynağı alanının aralık benzeri bir seri için değerler sağladığını belirtir. - /// Bu üye aşağıdaki seriler tarafından kullanılır: - /// RangeBarSeries, RangeAreaSeries - /// - public string RangeValue2Field { get; set; } = "val2"; - /// Kullanıcı bir dizi seçtiğinde vurgulanacak dizi öğelerini belirtir. - /// Accepted Values: 'allArgumentPoints' | 'allSeriesPoints' | 'excludePoints' | 'includePoints' | 'none' | 'onlyPoint' - /// Seri tipine bağlı olarak bu özellik farklı değerler kabul eder. Bilgi için SeriTipleri bölümünü (https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxChart/Series_Types/) ziyaret edin, kullanılan seri tipini seçin ve onun selectionMode özellik açıklamasına bakın - /// - public string SelectionMode { get; set; } = "none"; - /// Dizinin lejantta gösterilip gösterilmeyeceğini belirtir. - /// - public bool ShowInLegend { get; set; } = true; - /// Seri türünü ayarlar - /// Default Value: 'line' - /// Accepted Values: 'area' | 'bar' | 'bubble' | 'candlestick' | 'fullstackedarea' | 'fullstackedbar' | 'fullstackedline' | 'fullstackedspline' | 'fullstackedsplinearea' | 'line' | 'rangearea' | 'rangebar' | 'scatter' | 'spline' | 'splinearea' | 'stackedarea' | 'stackedbar' | 'stackedline' | 'stackedspline' | 'stackedsplinearea' | 'steparea' | 'stepline' | 'stock' - /// - public string Type { get; set; } - /// Hangi veri kaynağı alanının seri noktaları için değerler sağladığını belirtir. - /// Bu üye aşağıdaki seriler tarafından kullanılır: - /// LineSeries, StackedLineSeries,FullStackedLineSeries,StackedSplineSeries,FullStackedSplineSeries, - /// SplineSeries,StepLineSeries,AreaSeries,StackedAreaSeries,Sta,kedSplineAreaSeries,FullStackedAreaSeries, - /// FullStackedSplineAreaSeries,SplineAreaSeries,StepAreaSeries,ScatterSeries,BarSeries,StackedBarSeries, - /// FullStackedBarSeries,BubbleSeries, - /// - public string ValueField { get; set; } - /// Serinin görünür olup olmayacağını belirtir. - /// - public bool Visible { get; set; } = true; - /// Seri çizgisinin genişliğini piksel cinsinden belirtir. Yalnızca çizgi benzeri seriler için geçerlidir. - /// Default Value: 2 - /// Bu üye aşağıdaki seriler tarafından kullanılır: - /// LineSeries, StackedLineSeries, FullStackedLineSeries, StackedSplineSeries, FullStackedSplineSeries, SplineSeries, StepLineSeries, CandleStickSeries, StockSeries - /// - public int Width { get; set; } = 2; - - // hoverStyle - // hoverMode - // highValueField // for financial series - // closeValueField // for financial series - // border Dto - // innerColor - // label Dto - // lowValueField - // maxLabelCount - // minBarSize - // openValueField - // point Dto - // reduction // financial seriler için indirgeme özelliklerini belirtir. - // slectionStyle // Bir kullanıcı seçtiğinde seri tarafından benimsenen görünümü yapılandırır. - // stack - // tag - // tagField - // valueErrorBar - - public ChartLabelDto Label { get; set; } - } - - /// Grafikteki tüm seriler için ortak olan ayarları belirtir. - /// - public class ChartCommonSeriesSettingsDto - { - /// Hangi veri kaynağı alanının seri noktaları için bağımsız değişkenler sağladığını belirtir - /// Default Value: 'arg' - /// Temaler ile kullanılamaz! - /// - public string ArgumentField { get; set; } = "arg"; - /// Seriyi bir değer eksenine bağlar. - /// - public string Axis { get; set; } - /// Aynı bağımsız değişkene sahip çubukların üst üste binmesi için çubuk serilerini gruplandırmanıza izin verir. - /// Bu üye şu seriler tarafından kullanılır: BarSeries, RangeBarSeries - /// - public string BarOverlapGroup { get; set; } - /// Göreli birimleri kullanarak bir serideki tüm çubukların dolgusunu ve dolayısıyla genişliğini kontrol eder. barWidth özelliği ayarlanmışsa yoksayılır. - /// Bu üye şu seriler tarafından kullanılır: BarSeries, StackedBarSeries, FullStackedBarSeries, RangeBarSeries - /// - public int BarPadding { get; set; } - /// Bir dizideki tüm çubuklar için piksel cinsinden ölçülen sabit bir genişlik belirtir. barPadding özelliğine göre önceliklidir. - /// Bu üye şu seriler tarafından kullanılır: BarSeries, StackedBarSeries, FullStackedBarSeries, RangeBarSeries - /// - public int BarWidth { get; set; } - /// Serinin rengini belirtir. - /// Bu özellik aşağıdaki renkleri destekler: - /// Hexadecimal colors - /// RGB colors - /// RGBA colors - /// Predefined/cross-browser color names - /// Predefined SVG colors - /// Paint server address - /// - public string Color { get; set; } - /// Çubukların yuvarlak görünmesini sağlar. Yalnızca çubuk benzeri seriler için geçerlidir. - /// Default Value: 0 - /// Bu üye şu seriler tarafından kullanılır: BarSeries, StackedBarSeries, FullStackedBarSeries, RangeBarSeries - /// - public int CornerRadius { get; set; } = 0; - /// Açıklamanın kenarlığı için bir tire stili ayarlar - /// Accepted Values: 'dash' | 'dot' | 'longDash' | 'solid' - /// Default Value: 'solid' - /// solid : Kenarlık düz, sürekli bir çizgidir - /// longDash : Kenarlık, uzun çizgiler kullanılarak görüntülenir - /// dash : Kenarlık, tireler kullanılarak görüntülenir - /// dot : Kenarlık noktalar kullanılarak görüntülenir - /// Any combination of 'longDash', 'dash' and 'dot : Kenarlık, belirtilen kombinasyon tekrarlanarak görüntülenir. Örneğin, 'dashdotdash'. - /// - public string DashStyle { get; set; } = "solid"; - /// Serinin boş veri noktalarını göz ardı edip etmeyeceğini belirtir. - /// Boş değere sahip veri noktaları, gerçek seri noktaları üretmez. Bu nedenle eksik olması gereken yerlerde gereksiz boşluklarla seriler çizilebilir. Bu boşlukları kaldırmak için, ignoreEmptyPoints özelliğini true olarak ayarlayın. - /// - public bool IgnoreEmptyPoints { get; set; } = false; - /// Serinin hangi bölmeye ait olması gerektiğini belirtir. Bölmenin adını kabul eder. - /// Bilgilendirme: Pane dolu ise chart ın PanesDto Property si aynı isimde bir elemanı mutlaka içermelidir - /// - public string Pane { get; set; } - - /// rangeValue2Field özelliğiyle birleştiğinde, hangi veri kaynağı alanının aralık benzeri bir seri için değerler sağladığını belirtir. - /// Bu üye aşağıdaki seriler tarafından kullanılır: - /// RangeBarSeries, RangeAreaSeries - /// - public string RangeValue1Field { get; set; } = "val1"; - /// rangeValue1Field özelliğiyle birleştiğinde, hangi veri kaynağı alanının aralık benzeri bir seri için değerler sağladığını belirtir. - /// Bu üye aşağıdaki seriler tarafından kullanılır: - /// RangeBarSeries, RangeAreaSeries - /// - public string RangeValue2Field { get; set; } = "val2"; - /// Kullanıcı bir dizi seçtiğinde vurgulanacak dizi öğelerini belirtir. - /// Accepted Values: 'allArgumentPoints' | 'allSeriesPoints' | 'excludePoints' | 'includePoints' | 'none' | 'onlyPoint' - /// Seri tipine bağlı olarak bu özellik farklı değerler kabul eder. Bilgi için SeriTipleri bölümünü (https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxChart/Series_Types/) ziyaret edin, kullanılan seri tipini seçin ve onun selectionMode özellik açıklamasına bakın - /// - public string SelectionMode { get; set; } = "none"; - /// Dizinin lejantta gösterilip gösterilmeyeceğini belirtir. - /// - public bool ShowInLegend { get; set; } = true; - /// Seri türünü ayarlar - /// Default Value: 'line' - /// Accepted Values: 'area' | 'bar' | 'bubble' | 'candlestick' | 'fullstackedarea' | 'fullstackedbar' | 'fullstackedline' | 'fullstackedspline' | 'fullstackedsplinearea' | 'line' | 'rangearea' | 'rangebar' | 'scatter' | 'spline' | 'splinearea' | 'stackedarea' | 'stackedbar' | 'stackedline' | 'stackedspline' | 'stackedsplinearea' | 'steparea' | 'stepline' | 'stock' - /// - public string Type { get; set; } - /// Hangi veri kaynağı alanının seri noktaları için değerler sağladığını belirtir. - /// Bu üye aşağıdaki seriler tarafından kullanılır: - /// LineSeries, StackedLineSeries,FullStackedLineSeries,StackedSplineSeries,FullStackedSplineSeries, - /// SplineSeries,StepLineSeries,AreaSeries,StackedAreaSeries,Sta,kedSplineAreaSeries,FullStackedAreaSeries, - /// FullStackedSplineAreaSeries,SplineAreaSeries,StepAreaSeries,ScatterSeries,BarSeries,StackedBarSeries, - /// FullStackedBarSeries,BubbleSeries, - /// - public string ValueField { get; set; } - /// Serinin görünür olup olmayacağını belirtir. - /// - public bool Visible { get; set; } = true; - /// Seri çizgisinin genişliğini piksel cinsinden belirtir. Yalnızca çizgi benzeri seriler için geçerlidir. - /// Default Value: 2 - /// Bu üye aşağıdaki seriler tarafından kullanılır: - /// LineSeries, StackedLineSeries, FullStackedLineSeries, StackedSplineSeries, FullStackedSplineSeries, SplineSeries, StepLineSeries, CandleStickSeries, StockSeries - /// - public int Width { get; set; } = 2; - - // aggregation {} - // area {} - // bar {} - // border {} - // bubble {} - // candlestick {} - // closeValueField // for financial series - // fullstackedarea {} - // fullstackedbar {} - // fullstackedline {} - // fullstackedspline {} - // fullstackedsplinearea {} - // highValueField - // hoverMode - // hoverStyle - // innerColor - // label {} - // line {} - // lowValueField - // maxLabelCount - // minBarSize - // opacity - // openValueField - // point {} - // rangearea {} - // rangebar {} - // reduction {} // financial seriler için indirgeme özelliklerini belirtir. - // scatter {} - // slectionStyle // Bir kullanıcı seçtiğinde seri tarafından benimsenen görünümü yapılandırır. - // sizeField - // spline {} - // splinearea {} - // stack {} - // stackedarea {} - // stackedbar {} - // stackedline {} - // stackedspline{} - // stackedsplinearea {} - // steparea {} - // stepline {} - // stock {} - // tagField - // valueErrorBar - - public ChartLabelDto Label { get; set; } - } - - /// Bir grafikteki tüm bölmeler için ortak ayarları tanımlar. - /// - public class ChartCommonPaneDto - { - /// Bölmenin arka planının rengini belirtir. - /// Bu özellik aşağıdaki renkleri destekler: - /// Hexadecimal colors - /// RGB colors - /// RGBA colors - /// Predefined/cross-browser color names - /// Predefined SVG colors - /// Paint server address - /// - public string BackgroundColor { get; set; } - - //public PaneBorderDto Border { get; set; } // TODO - - } - - /// - /// - /// - public class ChartCommonAxisDto - { - public ChartCommonAxisDto() - { - Grid = new ChartAxisGrid(); - } - - public ChartAxisGrid Grid { get; set; } - /// Ana eksen işaretlerinin görünümünü yapılandırır. - /// Şimdilik sadece string olaran implemen edildi, ihtiyaç olması durumunda ChartTitleDto benzeri bir nesne ile değiştirilebilir - /// - public string Title { get; set; } - /// Eksen çizgisini görünür yapar. - /// - public bool Visible { get; set; } = true; - /// Eksen çizgisinin genişliğini piksel cinsinden belirtir. - /// - public int Width { get; set; } = 1; - - // ihtiyaç olunca açılacak proptert ler - - // aggregatedPointsPosition - // allowDecimals - // breakStyle {} - // color - // constantLineStyle {} - // discreteAxisDivisionMode - // endOnTick - // inverted - // label {} - // maxValueMargin - // minorGrid {} - // minorTick {} - // minValueMargin - // opacity - // placeholderSize - // stripStyle {} - // tick {} - // valueMarginsEnabled - } - - public class ChartScrollBarDto - { - /// ScrollBar ın kenarlığını renklendirir. - /// Bu özellik aşağıdaki renkleri destekler: - /// Hexadecimal colors - /// RGB colors - /// RGBA colors - /// Predefined/cross-browser color names - /// Predefined SVG colors - /// Paint server address - /// - public string Color { get; set; } = "gray"; - /// Kaydırma çubuğu ile grafiğin çizimi arasındaki boşluğu piksel cinsinden belirtir. - /// - public int Offset { get; set; } = 5; - - ///// Kaydırma çubuğunun opaklığını belirtir. - ///// - ///// - //public double Opacity { get; set; } - - /// Grafikteki kaydırma çubuğunun konumunu belirtir. - /// Accepted Values: 'bottom' | 'left' | 'right' | 'top' - /// Default Value: 'top' - /// Grafiğin döndürülüp döndürülmediğine bağlı olarak bu özellik farklı değerler kabul eder. Döndürülmemiş bir grafikte, bu özelliğe 'üst' veya 'alt' atayabilirsiniz. Döndürülmüş bir grafikte, bu özellik ya 'sol' ya da 'sağ'ı kabul eder. - /// - public string Position { get; set; } = "top"; - /// Kaydırma çubuğunun görünüp görünmeyeceğini belirtir. - /// - public bool Visible { get; set; } - /// Kaydırma çubuğunun genişliğini piksel cinsinden belirtir. - /// - public int Width { get; set; } = 10; - } - - /// Yakınlaştırmayı ve kaydırmayı yapılandırır. - /// Bağımsız değişken ve değer eksenleri için yakınlaştırmayı ve kaydırmayı etkinleştirebilirsiniz. Belirli bir eksen için yakınlaştırmayı, kaydırmayı veya her ikisini birden etkinleştirmek için argumentAxis ve valueAxis özelliklerini ayarlayın. - /// - public class ChartZoomAndPanDto - { - public ChartZoomAndPanDto() - { - DragBoxStyle = new ChartDragBoxStyle(); - } - - /// Kullanıcıların grafiği yakınlaştırmak için fare tekerleğini kullanıp kullanamayacağını belirtir. Yalnızca bağımsız değişken veya değer ekseni için yakınlaştırmaya izin veriliyorsa geçerlidir. - /// - public bool AllowMouseWheel { get; set; } = true; - /// Kullanıcıların grafiği yakınlaştırmak veya kaydırmak için dokunma hareketlerini kullanıp kullanamayacağını belirtir. Yalnızca bağımsız değişken veya değer ekseni için yakınlaştırma ve kaydırmaya izin veriliyorsa geçerlidir. - /// - public bool AllowTouchGestures { get; set; } = true; - /// Kullanıcıların bağımsız değişken eksenini yakınlaştırmasına ve/veya kaydırmasına izin verilip verilmediğini belirtir. - /// Accepted Values: 'both' | 'none' | 'pan' | 'zoom' - /// - public string ArgumentAxis { get; set; } = "none"; - /// Kullanıcıların, sürükleme hareketiyle bir alan seçerek grafiği yakınlaştırmasına olanak tanır. Yalnızca fare kullanan cihazlarda geçerlidir. - /// - public bool DragToZoom { get; set; } = false; - /// dragToZoom true olduğunda kaydırmayı etkinleştiren anahtarı belirtir. Yalnızca fare kullanan cihazlarda geçerlidir. - /// Accepted Values: 'alt' | 'ctrl' | 'meta' | 'shift' - /// - public string PanKey { get; set; } = "shift"; - /// Kullanıcıların değer eksenini yakınlaştırmasına ve/veya kaydırmasına izin verilip verilmediğini belirtir. - /// Accepted Values: 'both' | 'none' | 'pan' | 'zoom' - /// - public string ValueAxis { get; set; } = "none"; - /// Kullanıcılar sürükleme hareketiyle bir alan seçerek grafiği yakınlaştırdığında görünen kutuyu yapılandırır. Yalnızca dragToZoom doğruysa geçerlidir. - /// - public ChartDragBoxStyle DragBoxStyle { get; set; } - } - - public class ChartDragBoxStyle - { - /// Sürükleme kutusunun rengini belirtir. - /// Bu özellik aşağıdaki renkleri destekler: - /// Hexadecimal colors - /// RGB colors - /// RGBA colors - /// Predefined/cross-browser color names - /// Predefined SVG colors - /// Paint server address - /// - public string Color { get; set; } - /// Sürükleme kutusunun saydamlığını belirtir. - /// 0 - 1 aralığındadır - /// - public double Opacity { get; set; } - } - - /// Animasyon özelliklerini belirtir. - /// - public class ChartAnimationDto - { - /// Animasyonun milisaniye cinsinden ne kadar süreceğini belirtir. - /// - [Range(100, 2500, ErrorMessage = "Value for {0} must be between {1} and {2}.")] - public int Duration { get; set; } = 1000; - /// Animasyonun kolaylaştırma işlevini belirtir. - /// Accepted Values: 'easeOutCubic' | 'linear' - /// easeOutCubic: Animasyon hızlı başlar ve sona doğru kademeli olarak yavaşlar. - /// linear : Animasyon sabit bir hızda ilerler. - /// - public string Easing { get; set; } = "easeOutCubic"; - /// UI bileşeninde animasyonu etkinleştirir. - /// - public bool Enabled { get; set; } = true; - /// Animasyon devre dışı bırakılmadan önce UI bileşeninin kaç seri noktasına sahip olması gerektiğini belirtir. - /// Grafiğinizdeki seri noktalarının sayısı zamanla artarsa bunlara animasyon uygulamak, UI bileşen performansını etkileyebilir. - /// Bu durumda, nokta sayısı için bir sınır belirtmek üzere maxPointCountSupported özelliğini kullanın. - /// Bu sınır aşıldığında animasyon devre dışı bırakılır. - /// - public int MaxPointCountSupported { get; set; } = 300; - } - - public class ChartExportDto - { - /// Ortaya çıkan dosya veya belgedeki saydam bölgeleri dolduracak rengi belirtir. - /// Bu özellik aşağıdaki renkleri destekler: - /// Hexadecimal colors - /// RGB colors - /// RGBA colors - /// Predefined/cross-browser color names - /// Predefined SVG colors - /// Paint server address - /// - public string BackgroundColor { get; set; } = "#ffffff"; - /// UI bileşeninde istemci tarafında dışa aktarmayı etkinleştirir. - /// - public bool Enabled { get; set; } - ///// Dışa aktarma formatı belirtir. - ///// Desteklenen formatlar: 'GIF' | 'JPEG' | 'PDF' | 'PNG' | 'SVG' - ///// - //public string Formats { get; set; } = "['PNG', 'PDF', 'JPEG', 'SVG', 'GIF']"; - - /// Dışa aktarılan UI bileşeninin etrafına boş bir alan ekler; piksel cinsinden ölçülür. - /// - public int Margin { get; set; } = 10; - /// UI bileşeninde yazdırma özelliğini etkinleştirir. Yalnızca export.enabled özelliği doğruysa geçerlidir. /// - /// - public bool PrintingEnabled { get; set; } = true; - - // svgToCanvas // HTML tuvalinde SVG işaretlemesini işleyen bir işlev. Özel SVG öğelerini (örneğin, markerTemplate) dışa aktarmak için gereklidir. - } - - public class ChartCrosshairDto - { - public ChartCrosshairDto() - { - HorizontalLine = new ChartCrosshairLineDto(); - Label = new ChartLabelDto(); - VerticalLine = new ChartCrosshairLineDto(); - } - - /// Artı işareti çizgilerinin rengini belirtir. - /// Bu özellik aşağıdaki renkleri destekler: - /// Hexadecimal colors - /// RGB colors - /// RGBA colors - /// Predefined/cross-browser color names - /// Predefined SVG colors - /// Paint server address - /// - public string Color { get; set; } = "#f05b41"; - /// Artı işareti çizgilerinin kısa çizgi stilini belirtir. - /// Accepted Values: 'dash' | 'dot' | 'longDash' | 'solid' - /// Default Value: 'solid' - /// solid : Kenarlık düz, sürekli bir çizgidir - /// longDash : Kenarlık, uzun çizgiler kullanılarak görüntülenir - /// dash : Kenarlık, tireler kullanılarak görüntülenir - /// dot : Kenarlık noktalar kullanılarak görüntülenir - /// Any combination of 'longDash', 'dash' and 'dot : Kenarlık, belirtilen kombinasyon tekrarlanarak görüntülenir. Örneğin, 'dashdotdash'. - /// - public string DashStyle { get; set; } = "dot"; - /// Artı işaretini etkinleştirir. - /// - public bool Enabled { get; set; } - ///// Sürükleme kutusunun saydamlığını belirtir. - ///// 0 - 1 aralığındadır - ///// - //public double Opacity { get; set; } = 1; - /// Artı işareti çizgilerinin genişliğini belirtir. - /// - public int Width { get; set; } = 1; - - /// Yatay çapraz çizgiyi ayrı ayrı yapılandırır. - /// - public ChartCrosshairLineDto HorizontalLine { get; set; } - /// Artı işareti etiketlerini yapılandırır. - /// - public ChartLabelDto Label { get; set; } - /// Dikey artı çizgisini ayrı ayrı yapılandırır. - /// - public ChartCrosshairLineDto VerticalLine { get; set; } - } - - public class ChartCrosshairLineDto - { - public ChartCrosshairLineDto() - { - Label = new ChartLabelDto(); - } - - public string Color { get; set; } = "#f05b41"; - public string DashStyle { get; set; } = "dot"; - public ChartLabelDto Label { get; set; } - //public double Opacity { get; set; } = 0.5; - public bool Visible { get; set; } = true; - public int Width { get; set; } = 1; - } - - public class ChartLabelDto - { - public ChartLabelDto() - { - Font = new ChartFontDto(); - } - - /// Etiketin arka planını boyar. - /// Bu özellik aşağıdaki renkleri destekler: - /// Hexadecimal colors - /// RGB colors - /// RGBA colors - /// Predefined/cross-browser color names - /// Predefined SVG colors - /// Paint server address - /// - public string BackgroundColor { get; set; } = "#f05b41"; - /// görüntülenen metni özelleştirir. - /// Temalarda kullanılamaz. - /// - public string CustomizeText { get; set; } - public ChartFontDto Font { get; set; } - public bool Visible { get; set; } - /// Artı işareti etiketinde görüntülenmeden önce bir nokta değerini/bağımsız değişkeni biçimlendirir. /// - /// Accepted Values: 'billions' | 'currency' | 'day' | 'decimal' | 'exponential' | 'fixedPoint' | 'largeNumber' | 'longDate' | 'longTime' | 'millions' | 'millisecond' | 'month' | 'monthAndDay' | 'monthAndYear' | 'percent' | 'quarter' | 'quarterAndYear' | 'shortDate' | 'shortTime' | 'thousands' | 'trillions' | 'year' | 'dayOfWeek' | 'hour' | 'longDateLongTime' | 'minute' | 'second' | 'shortDateShortTime' - /// - public string Format { get; set; } - - } - - /// Artı işareti etiketleri için yazı tipi özelliklerini belirtir. - /// - public class ChartFontDto - { - /// Yazı tipi rengini belirtir. - /// Bu özellik aşağıdaki renkleri destekler: - /// Hexadecimal colors - /// RGB colors - /// RGBA colors - /// Predefined/cross-browser color names - /// Predefined SVG colors - /// Paint server address - /// - public string Color { get; set; } = "#FFFFFF"; - /// Yazı tipi ailesini belirtir. - /// Default Value: '"Segoe UI", "Helvetica Neue", "Trebuchet MS", Verdana, sans-serif' - /// - public string Family { get; set; } = "\"Segoe UI\", \"Helvetica Neue\", \"Trebuchet MS\", Verdana, sans-serif"; - ///// Yazı tipi saydamlığını belirtir. - ///// 0 - 1 aralığındadır - ///// - //public double Opacity { get; set; } = 1; - /// Yazı tipi boyutunu belirtir. - /// - public int Size { get; set; } = 12; - /// - /// Yazı tipi ağırlığını belirtir. 100'lük artışlarla 100 ile 900 arasındaki değerleri kabul eder. Daha yüksek değerler kalınlığı artırır. - /// - public int Weight { get; set; } = 400; - } - - public class ChartAxisGrid - { - /// Grid çizgilerinin rengini belirtir. - /// Bu özellik aşağıdaki renkleri destekler: - /// Hexadecimal colors - /// RGB colors - /// RGBA colors - /// Predefined/cross-browser color names - /// Predefined SVG colors - /// Paint server address - /// - public string Color { get; set; } = "#d3d3d3"; - /// Grid çizgilerini görünür yapar. - /// - public bool Visible { get; set; } - /// Grid çizgilerinin genişliğini piksel cinsinden belirtir. - /// - public int Width { get; set; } = 1; - - - ///// Grid çizgilerinin saydamlığını belirtir. - ///// 0 - 1 aralığındadır - ///// - //public double Opacity { get; set; } = 1; - } - - public class ChartMarginDto - { - public int Bottom { get; set; } - public int Left { get; set; } - public int Right { get; set; } - public int Top { get; set; } - } - - /// Araç ipuçlarını yapılandırır. - /// - public class ChartTooltipDto - { - public ChartTooltipDto() - { - Border = new ChartBorderDto(); - Font = new ChartFontDto() { Color = "#000000" }; - } - - /// Araç ipucunda görüntülenmeden önce nokta bağımsız değişkenini biçimlendirir. Puan değerini biçimlendirmek için format özelliğini kullanın. - /// /// Accepted Values: 'billions' | 'currency' | 'day' | 'decimal' | 'exponential' | 'fixedPoint' | 'largeNumber' | 'longDate' | 'longTime' | 'millions' | 'millisecond' | 'month' | 'monthAndDay' | 'monthAndYear' | 'percent' | 'quarter' | 'quarterAndYear' | 'shortDate' | 'shortTime' | 'thousands' | 'trillions' | 'year' | 'dayOfWeek' | 'hour' | 'longDateLongTime' | 'minute' | 'second' | 'shortDateShortTime' - /// - public string ArgumentFormat { get; set; } - /// Bir araç ipucunun okunun uzunluğunu piksel cinsinden belirtir. - /// - public int ArrowLength { get; set; } = 10; - /// Bir araç ipucunun kenarlığını yapılandırır. - /// - public ChartBorderDto Border { get; set; } - /// Tüm araç ipuçlarını renklendirir. - /// Bu özellik aşağıdaki renkleri destekler: - /// Hexadecimal colors - /// RGB colors - /// RGBA colors - /// Predefined/cross-browser color names - /// Predefined SVG colors - /// Paint server address - /// - public string Color { get; set; } = "#ffffff"; - /// Araç ipuçlarını etkinleştirir. - /// - public bool Enabled { get; set; } - public ChartFontDto Font { get; set; } - /// Bir değeri araç ipucunda görüntülenmeden önce biçimlendirir. - /// /// Accepted Values: 'billions' | 'currency' | 'day' | 'decimal' | 'exponential' | 'fixedPoint' | 'largeNumber' | 'longDate' | 'longTime' | 'millions' | 'millisecond' | 'month' | 'monthAndDay' | 'monthAndYear' | 'percent' | 'quarter' | 'quarterAndYear' | 'shortDate' | 'shortTime' | 'thousands' | 'trillions' | 'year' | 'dayOfWeek' | 'hour' | 'longDateLongTime' | 'minute' | 'second' | 'shortDateShortTime' - /// - public string Format { get; set; } - /// Araç ipucunun bir seri noktasının merkezinde mi yoksa kenarında mı bulunacağını belirtir. Yalnızca çubuk benzeri ve kabarcık serileri için geçerlidir. - /// Accepted Values: 'center' | 'edge' - /// Bu üye şu seriler tarafından kullanılır: BarSeries, StackedBarSeries, FullStackedBarSeries, BubbleSeries, StockSeries, CandleStickSeries - /// - public string Location { get; set; } = "center"; - /// Araç ipucunun sol/sağ kenarlığı ile metni arasında piksel cinsinden ölçülen boş bir alan oluşturur. - /// - public int PaddingLeftRight { get; set; } = 18; - /// Araç ipucunun üst/alt kenarlığı ile metni arasında piksel cinsinden ölçülen boş bir alan oluşturur. - /// - public int PaddingTopBottom { get; set; } = 15; - /// Araç ipucunun aynı bağımsız değişkenle tüm seri noktalarında paylaşılıp paylaşılmayacağını belirtir. - /// Bu özellik aşağıdaki değerlerden birine sahip olabilir: - /// false: Araç ipucu, yalnızca fare imleciyle üzerine getirilen bir seri noktası hakkındaki bilgileri görüntüler. - /// true : Araç ipucu, üzerine gelinen noktayla aynı bağımsız değişkene sahip tüm seri noktaları hakkında bilgi görüntüler. - /// Bu nokta bir yığına dahilse, araç ipucu yalnızca bu yığındaki noktalar ve herhangi bir yığına (varsa) ait olmayan noktalar hakkında bilgi görüntüler. - /// - public bool Shared { get; set; } - - // customizeTooltip() - - // container - // contentComponent - // contentRender - // contentTemplate // https://js.devexpress.com/Demos/WidgetsGallery/Demo/Charts/TooltipHTMLSupport/jQuery/Light/ - // cornerRadius - // customizeTooltip - // interactive - // opacity - // shadow {} - // zIndex - } - - /// public class ChartTooltipDto - /// - public class ChartAnnotationDto - { - public ChartAnnotationDto() - { - Border = new ChartBorderDto(); - Font = new ChartFontDto(); - } - - /// Ek açıklamayı belirli bir bağımsız değişkene göre konumlandırır. - /// - public string Argument { get; set; } - /// Ek açıklamanın kenarlığının görünümünü yapılandırır. - /// - public ChartBorderDto Border { get; set; } - /// Ek açıklamayı dolduran rengi belirtir. - /// Bu özellik aşağıdaki renkleri destekler: - /// Hexadecimal colors - /// RGB colors - /// RGBA colors - /// Predefined/cross-browser color names - /// Predefined SVG colors - /// Paint server address - /// - public string Color { get; set; } = "#ffffff"; - /// Annotations'ın açıklamasını araç ipucunda belirtir. - /// - public string Description { get; set; } - public ChartFontDto Font { get; set; } - /// Ek açıklamanın yüksekliğini piksel cinsinden belirtir. - /// - public int Height { get; set; } = -1; - /// Açıklamada görüntülenecek görüntüyü yapılandırır. Yalnızca tür "görüntü" ise geçerlidir. - /// - public string Image { get; set; } - /// Ek açıklamanın adını belirtir. - /// - public string Name { get; set; } - /// Ek açıklamayı yatay olarak taşır. - /// Bu özelliğe atanan sayı, piksel cinsinden kaymayı belirtir. Negatif bir sayı notu sola kaydırır ve pozitif bir sayı onu sağa kaydırır. - /// - public int OffsetX { get; set; } = -1; - /// Ek açıklamayı dikey olarak taşır. - /// Bu özelliğe atanan sayı, piksel cinsinden kaymayı belirtir. Negatif bir sayı ek açıklamayı yukarı kaydırır ve pozitif bir sayı onu aşağı kaydırır. - /// - public int OffsetY { get; set; } = -1; - /// Ek açıklamanın metni veya görüntüsü (piksel olarak belirtilir) çevresinde boş bir alan oluşturmak için paddingTopBottom ile birlikte kullanılır. - /// - public int PaddingLeftRight { get; set; } = 10; - /// paddingLeftRight ile birlikte, ek açıklama metninin veya görüntüsünün çevresinde boş bir alan oluşturur; piksel cinsinden belirtilir. - /// - public int PaddingTopBottom { get; set; } = 10; - /// Ek açıklamayı bir seri noktasına tutturur. Nokta dizisinin adını kabul eder. - /// - public string Series { get; set; } - /// Ek açıklamanın metnini belirtir. Yalnızca tür "metin" ise geçerlidir. - /// - public string Text { get; set; } - /// Ek açıklama araç ipucunun etkin olup olmadığını belirtir. - /// - public bool TooltipEnabled { get; set; } = true; - /// Ek açıklamanın metin mi, resim mi yoksa şablon mu görüntülediğini belirtir. Bu gerekli bir ayardır. - /// Accepted Values: 'text' | 'image' | 'custom' - /// Default Value: undefined - /// - public string Type { get; set; } - /// Ek açıklamayı belirtilen değer eksenindeki bir değere göre konumlandırır. - /// - public string Value { get; set; } - /// Ek açıklamanın genişliğini piksel cinsinden belirtir. - /// - public int Width { get; set; } - /// Ek açıklama metninin tek bir satıra sığmaması durumunda nasıl kaydırılacağını belirtir. - /// Accepted Values: 'normal' | 'breakWord' | 'none' - /// normal : Metin yalnızca izin verilen kesme noktalarında (örneğin, iki kelime arasındaki boşluk) kesiliyor. - /// breakWord : Words can be broken if there are no available breakpoints in the line. - /// none : Sözcük kaydırma devre dışı. - /// - public string WordWrap { get; set; } = "normal"; - /// Ek açıklamanın merkezini belirli bir piksel koordinatına konumlandırmak için y ile birlikte kullanılır. (0, 0), UI bileşeninin sol üst köşesidir. - /// - public int X { get; set; } - /// Ek açıklamanın merkezini belirli bir piksel koordinatına konumlandırmak için x ile birlikte kullanılır. (0, 0), UI bileşeninin sol üst köşesidir. - /// - public int Y { get; set; } - - // allowDragging - // arrowLength - // arrowWidth - // axis - // component - // customizeTooltip - // data - // opacity - // render for react - // shadow {} - // template - // textOverflow - // tooltipComponent for react - // tooltipRender - // tooltipTemplate - - } - - public class ChartCommonAnnotationDto - { - public ChartCommonAnnotationDto() - { - Border = new ChartBorderDto(); - Font = new ChartFontDto(); - } - - /// Ek açıklamayı belirli bir bağımsız değişkene göre konumlandırır. - /// - public string Argument { get; set; } - /// Ek açıklamanın kenarlığının görünümünü yapılandırır. - /// - public ChartBorderDto Border { get; set; } - /// Ek açıklamayı dolduran rengi belirtir. - /// Bu özellik aşağıdaki renkleri destekler: - /// Hexadecimal colors - /// RGB colors - /// RGBA colors - /// Predefined/cross-browser color names - /// Predefined SVG colors - /// Paint server address - /// - public string Color { get; set; } = "#ffffff"; - /// Annotations'ın açıklamasını araç ipucunda belirtir. - /// - public string Description { get; set; } - public ChartFontDto Font { get; set; } - /// Ek açıklamanın yüksekliğini piksel cinsinden belirtir. - /// - public int Height { get; set; } = -1; - /// Açıklamada görüntülenecek görüntüyü yapılandırır. Yalnızca tür "görüntü" ise geçerlidir. - /// - public string Image { get; set; } - /// Ek açıklamayı yatay olarak taşır. - /// Bu özelliğe atanan sayı, piksel cinsinden kaymayı belirtir. Negatif bir sayı notu sola kaydırır ve pozitif bir sayı onu sağa kaydırır. - /// - public int OffsetX { get; set; } = -1; - /// Ek açıklamayı dikey olarak taşır. - /// Bu özelliğe atanan sayı, piksel cinsinden kaymayı belirtir. Negatif bir sayı ek açıklamayı yukarı kaydırır ve pozitif bir sayı onu aşağı kaydırır. - /// - public int OffsetY { get; set; } = -1; - /// Ek açıklamanın metni veya görüntüsü (piksel olarak belirtilir) çevresinde boş bir alan oluşturmak için paddingTopBottom ile birlikte kullanılır. - /// - public int PaddingLeftRight { get; set; } = 10; - /// paddingLeftRight ile birlikte, ek açıklama metninin veya görüntüsünün çevresinde boş bir alan oluşturur; piksel cinsinden belirtilir. - /// - public int PaddingTopBottom { get; set; } = 10; - /// Ek açıklamayı bir seri noktasına tutturur. Nokta dizisinin adını kabul eder. - /// - public string Series { get; set; } - /// Ek açıklamanın metnini belirtir. Yalnızca tür "metin" ise geçerlidir. - /// - public string Text { get; set; } - /// Ek açıklama araç ipucunun etkin olup olmadığını belirtir. - /// - public bool TooltipEnabled { get; set; } = true; - /// Ek açıklamanın metin mi, resim mi yoksa şablon mu görüntülediğini belirtir. Bu gerekli bir ayardır. - /// Accepted Values: 'text' | 'image' | 'custom' - /// Default Value: undefined - /// - public string Type { get; set; } - /// Ek açıklamayı belirtilen değer eksenindeki bir değere göre konumlandırır. - /// - public string Value { get; set; } - /// Ek açıklamanın genişliğini piksel cinsinden belirtir. - /// - public int Width { get; set; } - /// Ek açıklama metninin tek bir satıra sığmaması durumunda nasıl kaydırılacağını belirtir. - /// Accepted Values: 'normal' | 'breakWord' | 'none' - /// normal : Metin yalnızca izin verilen kesme noktalarında (örneğin, iki kelime arasındaki boşluk) kesiliyor. - /// breakWord : Words can be broken if there are no available breakpoints in the line. - /// none : Sözcük kaydırma devre dışı. - /// - public string WordWrap { get; set; } = "normal"; - /// Ek açıklamanın merkezini belirli bir piksel koordinatına konumlandırmak için y ile birlikte kullanılır. (0, 0), UI bileşeninin sol üst köşesidir. - /// - public int X { get; set; } - /// Ek açıklamanın merkezini belirli bir piksel koordinatına konumlandırmak için x ile birlikte kullanılır. (0, 0), UI bileşeninin sol üst köşesidir. - /// - public int Y { get; set; } - - // allowDragging - // arrowLength - // arrowWidth - // axis - // component - // customizeTooltip - // data - // opacity - // render for react - // shadow {} - // template - // textOverflow - // tooltipComponent for react - // tooltipRender - // tooltipTemplate - } - - - public class ChartDataSourceDto - { - public string Query { get; set; } - } - - public class BreakStyleDto - { - /// Rengi belirtir. - /// Bu özellik aşağıdaki renkleri destekler: - /// Hexadecimal colors - /// RGB colors - /// RGBA colors - /// Predefined/cross-browser color names - /// Predefined SVG colors - /// Paint server address - /// - public string Color { get; set; } = "#ababab"; - /// Ölçek sonlarının çizgi stilini belirtir. - /// - public string Line { get; set; } = "waved"; - public int Width { get; set; } = 5; - - } - - /// Özel bir ölçek sonu koleksiyonu bildirir. Yalnızca eksen tipi "sürekli" veya "logaritmik" ise geçerlidir. - /// - public class BreakDto - { - /// startValue özelliği ile birlikte ölçek kırılmasını sınırlar. - /// - public int EndValue { get; set; } - - /// endValue özelliği ile birlikte, ölçek kırılmasını sınırlar. - /// - public int StartValue { get; set; } - } - -} diff --git a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/ChartDataRequestDto.cs b/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/ChartDataRequestDto.cs deleted file mode 100644 index 69a62a60..00000000 --- a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/ChartDataRequestDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace Kurs.Platform.Charts.Dto -{ - public class ChartDataRequestDto - { - [Required] - public string ChartCode { get; set; } - - public string Filter { get; set; } - } -} diff --git a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/ChartDto.cs b/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/ChartDto.cs deleted file mode 100644 index ff96da40..00000000 --- a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/ChartDto.cs +++ /dev/null @@ -1,413 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Text.Json.Serialization; -using Kurs.Platform.ListForms; -using Volo.Abp.Application.Dtos; - -namespace Kurs.Platform.Charts.Dto -{ - public class ChartEditDto : ChartDto - { - public string EditType { get; set; } - - /// Chart'a ait sorguların tutulduğu Json veri yapısı - /// - [JsonIgnore] - public string DataSourceJson { get; set; } - public ChartDataSourceDto DataSourceDto - { - get - { - if (!string.IsNullOrEmpty(DataSourceJson)) - return JsonSerializer.Deserialize(DataSourceJson); - return new ChartDataSourceDto(); - } - set { DataSourceJson = JsonSerializer.Serialize(value); } - } - } - - public class ChartDto : AuditedEntityDto - { - /// Tekil chart kodu - /// - public string ChartCode { get; set; } - /// Chart a yetkili kullanıcı. UserId ve RoleId boş ise herkes yetkilidir - /// - public string UserId { get; set; } - /// Chart a yetkili rol. UserId ve RoleId boş ise herkes yetkilidir - /// - public string RoleId { get; set; } - /// Grafik hangi dile ait - /// - public string CultureName { get; set; } - public string DataSourceCode { get; set; } // Veri kaynagi - - /// DxChart'ın istediği diğer bütün ayarların tutulduğu Json veri yapısı - /// - [JsonIgnore] - public string CommonJson { get; set; } - public ChartCommonDto CommonDto - { - get - { - if (!string.IsNullOrEmpty(CommonJson)) - return JsonSerializer.Deserialize(CommonJson); - return new ChartCommonDto(); - } - set { CommonJson = JsonSerializer.Serialize(value); } - } - - /// Uyarlanabilir düzen özelliklerini tutan Json veri yapısıdır. - /// Uyarlanabilir düzen, UI bileşeninin, kapsayıcıya sığmayan isteğe bağlı öğeleri gizlemesini sağlar. - /// Şu sırada gizlenir: Title, Export menu icon, Legend, Axis titles, Axis labels - /// - [JsonIgnore] - public string AdaptiveLayoutJson { get; set; } - public ChartAdaptivelayoutDto AdaptivelayoutDto - { - get - { - if (!string.IsNullOrEmpty(AdaptiveLayoutJson)) - return JsonSerializer.Deserialize(AdaptiveLayoutJson); - return new ChartAdaptivelayoutDto(); - } - set { AdaptiveLayoutJson = JsonSerializer.Serialize(value); } - } - - /// Animasyon özelliklerini belirtir. - /// UI bileşeni, öğeler ilk yüklenirken ve veri kaynağı değiştiğinde canlandırır - /// - [JsonIgnore] - public string AnimationJson { get; set; } - public ChartAnimationDto AnimationDto - { - get - { - if (!string.IsNullOrEmpty(AnimationJson)) - return JsonSerializer.Deserialize(AnimationJson); - return new ChartAnimationDto(); - } - set { AnimationJson = JsonSerializer.Serialize(value); } - } - - /// Ek açıklama koleksiyonuna ait Json veri yapısı. - /// Ek açıklamalar, görselleştirilmiş veriler hakkında ek bilgiler görüntüleyen resimler, metin blokları ve özel içerik için içeriklerdir - /// - [JsonIgnore] - public string AnnotationsJson { get; set; } - public List AnnotationsDto - { - get - { - if (!string.IsNullOrEmpty(AnnotationsJson)) - return JsonSerializer.Deserialize>(AnnotationsJson); - return new List(); - } - set { AnnotationsJson = JsonSerializer.Serialize(value); } - } - - /// Bağımsız değişken eksenini yapılandırır. - /// Burada açıklanan argumentAxis nesnesi, bağımsız değişken eksenini ayrı ayrı yapılandırır. - /// Bir grafikteki tüm eksenler için ortak ayarlar belirtmek üzere commonAxisSettings nesnesini kullanılmalıdır. - /// Eksene özgü ayarlar, ortak ayarları geçersiz kılar. - /// - [JsonIgnore] - public string ArgumentAxisJson { get; set; } - public ChartArgumentAxisDto ArgumentAxisDto - { - get - { - if (!string.IsNullOrEmpty(ArgumentAxisJson)) - return JsonSerializer.Deserialize(ArgumentAxisJson); - return new ChartArgumentAxisDto(); - } - set { ArgumentAxisJson = JsonSerializer.Serialize(value); } - } - - /// Grafikteki tüm detaylandırmalar için ortak olan ayarları belirtir. - /// Burada belirtilen ayarlar, AnnotationsJson dizisinde belirtilen bireysel ek açıklama ayarlar var ise göz ardı edilebilir. - /// Ek açıklamaların nasıl yapılandırılacağı hakkında bilgi için AnnotationsJson açıklamasına bakın. - /// - [JsonIgnore] - public string CommonAnnotationsSettingsJson { get; set; } - public ChartCommonAnnotationDto CommonAnnotationSettingsDto - { - get - { - if (!string.IsNullOrEmpty(CommonAnnotationsSettingsJson)) - return JsonSerializer.Deserialize(CommonAnnotationsSettingsJson); - return new ChartCommonAnnotationDto(); - } - set { CommonAnnotationsSettingsJson = JsonSerializer.Serialize(value); } - } - - /// Bir grafikte hem bağımsız değişken hem de değer ekseni için ortak ayarları tanımlar. - /// Burada belirtilen ayarlar, ArgumentAxisJson yada ValueAxisJson ayarları dolu ise göz ardı edilir - /// - [JsonIgnore] - public string CommonAxisSettingsJson { get; set; } - /// Bir grafikte hem bağımsız değişken hem de değer ekseni için ortak ayarları tanımlar. - /// - public ChartCommonAxisDto CommonAxisSettingsDto - { - get - { - if (!string.IsNullOrEmpty(CommonAxisSettingsJson)) - return JsonSerializer.Deserialize(CommonAxisSettingsJson); - return new ChartCommonAxisDto(); - } - set { CommonAxisSettingsJson = JsonSerializer.Serialize(value); } - } - - /// Bir grafikteki tüm bölmeler için ortak ayarları tanımlar. - /// Bölme, dizi içeren bir grafik alanıdır. Bir grafikte çok sayıda seri varsa, bunlar birden çok bölme arasında dağıtılabilir. - /// - [JsonIgnore] - public string CommonPaneSettingsJson { get; set; } - public ChartCommonPaneDto CommonPaneSettingsDto - { - get - { - if (!string.IsNullOrEmpty(CommonPaneSettingsJson)) - return JsonSerializer.Deserialize(CommonPaneSettingsJson); - return new ChartCommonPaneDto(); - } - set { CommonPaneSettingsJson = JsonSerializer.Serialize(value); } - } - - /// Grafikteki tüm seriler için ortak olan ayarları belirtir. - /// - [JsonIgnore] - public string CommonSeriesSettingsJson { get; set; } - public ChartCommonSeriesSettingsDto CommonSeriesSettingsDto - { - get - { - if (!string.IsNullOrEmpty(CommonSeriesSettingsJson)) - return JsonSerializer.Deserialize(CommonSeriesSettingsJson); - return new ChartCommonSeriesSettingsDto(); - } - set { CommonSeriesSettingsJson = JsonSerializer.Serialize(value); } - } - - /// fare ile grafik üzerindeki bir noktaya gelindiğinde yatay ve dikey çizgilerin çıkmasını sağlayan Json veri yapısıdır - /// - [JsonIgnore] - public string CrosshairJson { get; set; } - public ChartCrosshairDto CrosshairDto - { - get - { - if (!string.IsNullOrEmpty(CrosshairJson)) - return JsonSerializer.Deserialize(CrosshairJson); - return new ChartCrosshairDto(); - } - set { CrosshairJson = JsonSerializer.Serialize(value); } - } - - /// Dışa aktarma ve yazdırma özelliklerini yapılandırır - /// - [JsonIgnore] - public string ExportJson { get; set; } - public ChartExportDto ExportDto - { - get - { - if (!string.IsNullOrEmpty(ExportJson)) - return JsonSerializer.Deserialize(ExportJson); - return new ChartExportDto(); - } - set { ExportJson = JsonSerializer.Serialize(value); } - } - - /// Bir grafiğin açıklamasının (lejant) özelliklerini belirtir. - /// Grafik Kullanıcı Arabirimi bileşeni, bir diziyi tanımlamanıza yardımcı olan açıklayıcı bir bileşen olan bir açıklama içerebilir. - /// Her seri, bir Legend bir öğe ile temsil edilir. Bir öğe işaretçisi, seri rengini tanımlar. - /// - [JsonIgnore] - public string LegendJson { get; set; } - public ChartLegendDto LegendDto - { - get - { - if (!string.IsNullOrEmpty(LegendJson)) - return JsonSerializer.Deserialize(LegendJson); - return new ChartLegendDto(); - } - set { LegendJson = JsonSerializer.Serialize(value); } - } - - /// UI bileşeni çevresinde boşluk ayarlarını yapılandırır - /// - [JsonIgnore] - public string MarginJson { get; set; } - public ChartMarginDto MarginDto - { - get - { - if (!string.IsNullOrEmpty(MarginJson)) - return JsonSerializer.Deserialize(MarginJson); - return new ChartMarginDto(); - } - set { MarginJson = JsonSerializer.Serialize(value); } - } - - /// Bölme alanlarını bildirir. Bölme, dizi içeren bir grafik alanıdır. - /// Bir grafikte çok sayıda seri varsa, bunlar birden çok bölme arasında dağıtılabilir. - /// - [JsonIgnore] - public string PanesJson { get; set; } - /// - /// Bilgilendirme: PanesDto dolu ise Serilerin Pane property leri mutlaka dolu olmalıdır - /// - public List PanesDto - { - get - { - if (!string.IsNullOrEmpty(PanesJson)) - return JsonSerializer.Deserialize>(PanesJson); - return new List(); - } - set { PanesJson = JsonSerializer.Serialize(value); } - } - - /// Kaydırma çubuğunun ayarlarını belirtir. - /// - [JsonIgnore] - public string ScrollBarJson { get; set; } - public ChartScrollBarDto ScrollBarDto - { - get - { - if (!string.IsNullOrEmpty(ScrollBarJson)) - return JsonSerializer.Deserialize(ScrollBarJson); - return new ChartScrollBarDto(); - } - set { ScrollBarJson = JsonSerializer.Serialize(value); } - } - - /// Chart UI bileşen serisi için özellikleri belirtir. - /// Cannot be used in themes - /// - [JsonIgnore] - public string SeriesJson { get; set; } - public List SeriesDto - { - get - { - if (!string.IsNullOrEmpty(SeriesJson)) - return JsonSerializer.Deserialize>(SeriesJson); - return new List(); - } - set { SeriesJson = JsonSerializer.Serialize(value); } - } - - /// Char boyutunu belirtir - /// - [JsonIgnore] - public string SizeJson { get; set; } - public ChartSizeDto SizeDto - { - get - { - if (!string.IsNullOrEmpty(SizeJson)) - return JsonSerializer.Deserialize(SizeJson); - return new ChartSizeDto(); - } - set { SizeJson = JsonSerializer.Serialize(value); } - } - - /// Başlık ayarlarını içeren Json veri yapısı - /// - [JsonIgnore] - public string TitleJson { get; set; } - /// Başlık ayarlarının nesnesi - /// - public ChartTitleDto TitleDto - { - get - { - if (!string.IsNullOrEmpty(TitleJson)) - return JsonSerializer.Deserialize(TitleJson); - return new ChartTitleDto(); - } - set { TitleJson = JsonSerializer.Serialize(value); } - } - - /// Tooltip ayarlarını içeren Json veri yapısıdır. - /// Tooltip, bir seri noktasının değerlerini gösteren minyatür bir dikdörtgendir. - /// Kullanıcı imleci bir dizi noktasının üzerine getirdiğinde bir araç ipucu görünür. - /// - [JsonIgnore] - public string TooltipJson { get; set; } - public ChartTooltipDto TooltipDto - { - get - { - if (!string.IsNullOrEmpty(TooltipJson)) - return JsonSerializer.Deserialize(TooltipJson); - return new ChartTooltipDto(); - } - set { TooltipJson = JsonSerializer.Serialize(value); } - } - - /// Değer eksenini yapılandırır. - /// Burada açıklanan valueAxis nesnesi, değer eksenini ayrı ayrı yapılandırır. - /// Bir grafikteki tüm eksenler için ortak ayarlar belirtmek üzere commonAxisSettings nesnesini kullanılmalıdır. Eksene özgü ayarlar, ortak ayarları geçersiz kılar. - /// - [JsonIgnore] - public string ValueAxisJson { get; set; } - public List ValueAxisDto - { - get - { - if (!string.IsNullOrEmpty(ValueAxisJson)) - return JsonSerializer.Deserialize>(ValueAxisJson); - return new List(); - } - set { ValueAxisJson = JsonSerializer.Serialize(value); } - } - - /// Yakınlaştırmayı ve kaydırmayı yapılandırır. - /// Bağımsız değişken ve değer eksenleri için yakınlaştırmayı ve kaydırmayı etkinleştirebilirsiniz. - /// Belirli bir eksen için yakınlaştırmayı, kaydırmayı veya her ikisini birden etkinleştirmek için argumentAxis ve valueAxis özellikleri ayarlanmalıdır - /// - [JsonIgnore] - public string ZoomAndPanJson { get; set; } - public ChartZoomAndPanDto ZoomAndPanDto - { - get - { - if (!string.IsNullOrEmpty(ZoomAndPanJson)) - return JsonSerializer.Deserialize(ZoomAndPanJson); - return new ChartZoomAndPanDto(); - } - set { ZoomAndPanJson = JsonSerializer.Serialize(value); } - } - - /// Chart'ın sahip oldugu yetki tanimlari string Json nesnesi olarak tutulur - /// - [JsonIgnore] - public string PermissionJson { get; set; } - /// Chart'ın sahip oldugu yetki tanimlarinin nesne hali - /// Kullanıcının bu nesnenin içerisindeki yetki seviyelerine sahip olup olmadığı ABP üzerinden kontrol edilir - /// - public PermissionCrudDto PermissionDto - { - get - { - if (!string.IsNullOrEmpty(PermissionJson)) - return JsonSerializer.Deserialize(PermissionJson); - return new PermissionCrudDto(); - } - set { PermissionJson = JsonSerializer.Serialize(value); } - } - - public bool IsTenant { get; set; } - public bool IsBranch { get; set; } - public bool IsOrganizationUnit { get; set; } - } - - -} diff --git a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/ChartJsonItemRowDto.cs b/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/ChartJsonItemRowDto.cs deleted file mode 100644 index 36db54b3..00000000 --- a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/ChartJsonItemRowDto.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Kurs.Platform.Charts.Dto -{ - public class ChartJsonItemRowDto - { - public string Id { get; set; } - public string ChartCode { get; set; } - public int Index { get; set; } - public string FieldName { get; set; } - public ChartAnnotationDto ItemAnnotation { get; set; } - public ChartPanesDto ItemPane { get; set; } - public ChartSeriesDto ItemSerie { get; set; } - public ChartValueAxisDto ItemAxis { get; set; } - } -} diff --git a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/ChartOptionsRequestDto.cs b/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/ChartOptionsRequestDto.cs deleted file mode 100644 index e1511be8..00000000 --- a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/ChartOptionsRequestDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.ComponentModel.DataAnnotations; - -namespace Kurs.Platform.Charts.Dto -{ - public class ChartOptionsRequestDto - { - public string ChartCode { get; set; } - } - -} diff --git a/api/src/Kurs.Platform.Application.Contracts/Charts/IChartsAppService.cs b/api/src/Kurs.Platform.Application.Contracts/Charts/IChartsAppService.cs deleted file mode 100644 index 1b0ed3df..00000000 --- a/api/src/Kurs.Platform.Application.Contracts/Charts/IChartsAppService.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Threading.Tasks; -using Kurs.Platform.Charts.Dto; -using Volo.Abp.Application.Dtos; -using Volo.Abp.Application.Services; - -namespace Kurs.Platform.Charts.Select; - -public interface IChartsAppService : ICrudAppService< - ChartDto, - Guid, - PagedAndSortedResultRequestDto, - ChartEditDto> -{ - Task GetByChartCodeAsync(ChartOptionsRequestDto request); - Task GetChartOptionsAsync(ChartOptionsRequestDto request); - Task DeleteChartJsonItem(ChartJsonItemRowDto request); - Task UpdateChartJsonItem(ChartJsonItemRowDto model); -} diff --git a/api/src/Kurs.Platform.Application.Contracts/Charts/IChartsSelectAppService.cs b/api/src/Kurs.Platform.Application.Contracts/Charts/IChartsSelectAppService.cs deleted file mode 100644 index 9d8c5d8f..00000000 --- a/api/src/Kurs.Platform.Application.Contracts/Charts/IChartsSelectAppService.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.Threading.Tasks; -using Kurs.Platform.Charts.Dto; - -namespace Kurs.Platform.Charts.Select; - -public interface IChartSelectAppService -{ - Task GetSelectAsync(ChartDataRequestDto request); -} diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/BreakDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/BreakDto.cs new file mode 100644 index 00000000..46822b59 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/BreakDto.cs @@ -0,0 +1,14 @@ +namespace Kurs.Platform.ListForms; + +/// Özel bir ölçek sonu koleksiyonu bildirir. Yalnızca eksen tipi "sürekli" veya "logaritmik" ise geçerlidir. +/// +public class BreakDto +{ + /// startValue özelliği ile birlikte ölçek kırılmasını sınırlar. + /// + public int EndValue { get; set; } + + /// endValue özelliği ile birlikte, ölçek kırılmasını sınırlar. + /// + public int StartValue { get; set; } +} diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/BreakStyleDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/BreakStyleDto.cs new file mode 100644 index 00000000..180da107 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/BreakStyleDto.cs @@ -0,0 +1,20 @@ +namespace Kurs.Platform.ListForms; + +public class BreakStyleDto +{ + /// Rengi belirtir. + /// Bu özellik aşağıdaki renkleri destekler: + /// Hexadecimal colors + /// RGB colors + /// RGBA colors + /// Predefined/cross-browser color names + /// Predefined SVG colors + /// Paint server address + /// + public string Color { get; set; } = "#ababab"; + /// Ölçek sonlarının çizgi stilini belirtir. + /// + public string Line { get; set; } = "waved"; + public int Width { get; set; } = 5; + +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartAdaptivelayoutDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartAdaptivelayoutDto.cs new file mode 100644 index 00000000..5b1ad04b --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartAdaptivelayoutDto.cs @@ -0,0 +1,17 @@ +namespace Kurs.Platform.ListForms; + +/// Uyarlanabilir düzen özelliklerini belirtir. +/// Şu sırada gizlenir: Title, Export menu icon, Legend, Axis titles, Axis labels +/// +public class ChartAdaptivelayoutDto +{ + /// Düzenin uyum sağlamaya başladığı minimum kap yüksekliğini belirtir. + /// + public int Height { get; set; } = 80; + /// Düzenin uyum sağlamaya başladığı minimum kapsayıcı genişliğini belirtir. + /// + public int Width { get; set; } = 80; + /// UI bileşeni düzeni uyarladığında nokta etiketlerinin tutulması gerekip gerekmediğini belirtir. + /// + public bool KeepLabels { get; set; } = true; +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartAnimationDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartAnimationDto.cs new file mode 100644 index 00000000..dc0fc430 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartAnimationDto.cs @@ -0,0 +1,28 @@ +using System.ComponentModel.DataAnnotations; + +namespace Kurs.Platform.ListForms; + +/// Animasyon özelliklerini belirtir. +/// +public class ChartAnimationDto +{ + /// Animasyonun milisaniye cinsinden ne kadar süreceğini belirtir. + /// + [Range(100, 2500, ErrorMessage = "Value for {0} must be between {1} and {2}.")] + public int Duration { get; set; } = 1000; + /// Animasyonun kolaylaştırma işlevini belirtir. + /// Accepted Values: 'easeOutCubic' | 'linear' + /// easeOutCubic: Animasyon hızlı başlar ve sona doğru kademeli olarak yavaşlar. + /// linear : Animasyon sabit bir hızda ilerler. + /// + public string Easing { get; set; } = "easeOutCubic"; + /// UI bileşeninde animasyonu etkinleştirir. + /// + public bool Enabled { get; set; } = true; + /// Animasyon devre dışı bırakılmadan önce UI bileşeninin kaç seri noktasına sahip olması gerektiğini belirtir. + /// Grafiğinizdeki seri noktalarının sayısı zamanla artarsa bunlara animasyon uygulamak, UI bileşen performansını etkileyebilir. + /// Bu durumda, nokta sayısı için bir sınır belirtmek üzere maxPointCountSupported özelliğini kullanın. + /// Bu sınır aşıldığında animasyon devre dışı bırakılır. + /// + public int MaxPointCountSupported { get; set; } = 300; +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartAnnotationDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartAnnotationDto.cs new file mode 100644 index 00000000..368245aa --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartAnnotationDto.cs @@ -0,0 +1,105 @@ +namespace Kurs.Platform.ListForms; + +/// public class ChartTooltipDto +/// +public class ChartAnnotationDto +{ + public ChartAnnotationDto() + { + Border = new ChartBorderDto(); + Font = new ChartFontDto(); + } + + /// Ek açıklamayı belirli bir bağımsız değişkene göre konumlandırır. + /// + public string Argument { get; set; } + /// Ek açıklamanın kenarlığının görünümünü yapılandırır. + /// + public ChartBorderDto Border { get; set; } + /// Ek açıklamayı dolduran rengi belirtir. + /// Bu özellik aşağıdaki renkleri destekler: + /// Hexadecimal colors + /// RGB colors + /// RGBA colors + /// Predefined/cross-browser color names + /// Predefined SVG colors + /// Paint server address + /// + public string Color { get; set; } = "#ffffff"; + /// Annotations'ın açıklamasını araç ipucunda belirtir. + /// + public string Description { get; set; } + public ChartFontDto Font { get; set; } + /// Ek açıklamanın yüksekliğini piksel cinsinden belirtir. + /// + public int Height { get; set; } = -1; + /// Açıklamada görüntülenecek görüntüyü yapılandırır. Yalnızca tür "görüntü" ise geçerlidir. + /// + public string Image { get; set; } + /// Ek açıklamanın adını belirtir. + /// + public string Name { get; set; } + /// Ek açıklamayı yatay olarak taşır. + /// Bu özelliğe atanan sayı, piksel cinsinden kaymayı belirtir. Negatif bir sayı notu sola kaydırır ve pozitif bir sayı onu sağa kaydırır. + /// + public int OffsetX { get; set; } = -1; + /// Ek açıklamayı dikey olarak taşır. + /// Bu özelliğe atanan sayı, piksel cinsinden kaymayı belirtir. Negatif bir sayı ek açıklamayı yukarı kaydırır ve pozitif bir sayı onu aşağı kaydırır. + /// + public int OffsetY { get; set; } = -1; + /// Ek açıklamanın metni veya görüntüsü (piksel olarak belirtilir) çevresinde boş bir alan oluşturmak için paddingTopBottom ile birlikte kullanılır. + /// + public int PaddingLeftRight { get; set; } = 10; + /// paddingLeftRight ile birlikte, ek açıklama metninin veya görüntüsünün çevresinde boş bir alan oluşturur; piksel cinsinden belirtilir. + /// + public int PaddingTopBottom { get; set; } = 10; + /// Ek açıklamayı bir seri noktasına tutturur. Nokta dizisinin adını kabul eder. + /// + public string Series { get; set; } + /// Ek açıklamanın metnini belirtir. Yalnızca tür "metin" ise geçerlidir. + /// + public string Text { get; set; } + /// Ek açıklama araç ipucunun etkin olup olmadığını belirtir. + /// + public bool TooltipEnabled { get; set; } = true; + /// Ek açıklamanın metin mi, resim mi yoksa şablon mu görüntülediğini belirtir. Bu gerekli bir ayardır. + /// Accepted Values: 'text' | 'image' | 'custom' + /// Default Value: undefined + /// + public string Type { get; set; } + /// Ek açıklamayı belirtilen değer eksenindeki bir değere göre konumlandırır. + /// + public string Value { get; set; } + /// Ek açıklamanın genişliğini piksel cinsinden belirtir. + /// + public int Width { get; set; } + /// Ek açıklama metninin tek bir satıra sığmaması durumunda nasıl kaydırılacağını belirtir. + /// Accepted Values: 'normal' | 'breakWord' | 'none' + /// normal : Metin yalnızca izin verilen kesme noktalarında (örneğin, iki kelime arasındaki boşluk) kesiliyor. + /// breakWord : Words can be broken if there are no available breakpoints in the line. + /// none : Sözcük kaydırma devre dışı. + /// + public string WordWrap { get; set; } = "normal"; + /// Ek açıklamanın merkezini belirli bir piksel koordinatına konumlandırmak için y ile birlikte kullanılır. (0, 0), UI bileşeninin sol üst köşesidir. + /// + public int X { get; set; } + /// Ek açıklamanın merkezini belirli bir piksel koordinatına konumlandırmak için x ile birlikte kullanılır. (0, 0), UI bileşeninin sol üst köşesidir. + /// + public int Y { get; set; } + + // allowDragging + // arrowLength + // arrowWidth + // axis + // component + // customizeTooltip + // data + // opacity + // render for react + // shadow {} + // template + // textOverflow + // tooltipComponent for react + // tooltipRender + // tooltipTemplate +} diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartArgumentAxisDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartArgumentAxisDto.cs new file mode 100644 index 00000000..98bb4051 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartArgumentAxisDto.cs @@ -0,0 +1,120 @@ +namespace Kurs.Platform.ListForms; + +public class ChartArgumentAxisDto +{ + public ChartArgumentAxisDto() + { + Grid = new ChartAxisGridDto(); + Label = new ChartArgumentAxisLabelDto(); + } + + /// ArgumentAxis için Label sınıfı + /// https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxChart/Configuration/argumentAxis/label/ + /// + public class ChartArgumentAxisLabelDto + { + public ChartArgumentAxisLabelDto() { } + + /// Eksen etiketlerini döndürmenizi veya kademelendirmenizi sağlar. Yalnızca yatay eksen için geçerlidir. + /// Accepted Values: 'rotate' | 'stagger' | 'standard' + /// rotate : Eksen etiketlerini, rotateAngle özelliği tarafından belirtilen açı boyunca döndürür. + /// stagger: Eksen etiketlerini iki sıra halinde düzenler. Satırlar arasında boş bir alan, staggeringSpacing özelliği tarafından belirtilir. + /// standard:Eksen etiketlerinin varsayılan yerleşimini değiştirmez. + /// + public string DisplayMode { get; set; } = "standard"; + /// Eksen etiketlerinin dönüş açısını belirtir. Yalnızca displayMode veya overppingBehavior "rotate" ise geçerlidir. + /// + public int RotationAngle { get; set; } = 90; + /// Tümünü görüntülemek için yeterli alan olmadığında eksen etiketlerinin nasıl düzenleneceğine karar verir. + /// Accepted Values: 'rotate' | 'stagger' | 'none' | 'hide' + /// + public string OverlappingBehavior { get; set; } = "hide"; + } + + /// Bağımsız değişkenleri belirtilen bir veri türüne dönüştürür. + /// Accepted Values: 'datetime' | 'numeric' | 'string' + /// Default Value: undefined + /// Veri kaynağınız sayıları veya tarihleri ​​dizeler olarak saklıyorsa, bu özelliği kullanarak uygun veri türünü belirtin. Tarihlerin geçerli bir biçimi olduğundan emin olun. + /// + public string ArgumentType { get; set; } + /// Toplama aralıklarının uzunluğunu eksen birimleri cinsinden belirtir. Yalnızca sürekli ve logaritmik tipteki eksenler için geçerlidir. + /// Accepted Values: 'day' | 'hour' | 'millisecond' | 'minute' | 'month' | 'quarter' | 'second' | 'week' | 'year' + /// Default Value: undefined + /// Veri toplama için bağımsız değişken ekseni aralıklara bölünür. Aynı aralığa düşen seri noktaları bir araya toplanır. aggregationInterval özelliği, her aralığın uzunluğunu tanımlar. + /// nesne olarak da implement edilebilir, şimdilik yapılmadı. Örneğin 'day' seçildiğinde gün sayısı 5 olarak verilebilir + /// + public string AggregationInterval { get; set; } + public ChartAxisGridDto Grid { get; set; } + /// Kullanıcı bir eksen etiketini işaret ettiğinde vurgulanacak grafik öğelerini belirtir. + /// Accepted Values: 'allArgumentPoints' | 'none' + /// Default Value: 'none' + /// none : Eksen etiketleri, onlara işaret etmeye yanıt vermez. + /// allArgumentPoints : Bir kullanıcı bağımsız değişken ekseninde bir etiketi işaret ettiğinde, karşılık gelen bağımsız değişkenin seri noktaları vurgulanır. + /// + public string HoverMode { get; set; } = "none"; + public ChartArgumentAxisLabelDto Label { get; set; } + /// Bağımsız değişken ekseninin yerini değiştirir. + /// Accepted Values: 'bottom' | 'left' | 'right' | 'top' + /// Default Value: 'bottom' + /// Döndürülen (Rotated) özelliğin değerine bağlı olarak, konum (Position) farklı değerler kabul eder. + /// If (Rotated = False) => Position = "bottom" or "top" + /// If (Rotated = True) => Position = "left" or "right" + /// + public string Position { get; set; } = "bottom"; + /// Eksen başlığını yapılandırır. + /// Şimdilik sadece string olaran implemen edildi, ihtiyaç olması durumunda ChartTitleDto benzeri bir nesne ile değiştirilebilir + /// + public string Title { get; set; } + /// Eksen çizgisini görünür yapar. + /// + public bool Visible { get; set; } = true; + /// Eksen çizgisinin genişliğini piksel cinsinden belirtir. + /// + public int Width { get; set; } = 1; + /// Eksen üzerinde yalnızca iş günlerini bırakır: çalışma haftası günleri artı tek iş günleri eksi tatiller. Yalnızca eksenin argümanTürü "tarihsaat" ise geçerlidir. + /// + public bool WorkdaysOnly { get; set; } + + // ihtiyaç olunca açılacak proptert ler + + // aggregateByCategory + // aggregatedPointsPosition + // aggregationGroupWidth + // allowDecimals + // axisDivisionFactor // İki komşu ana çizgi arasındaki minimum mesafeyi piksel cinsinden belirtir. Yalnızca "sürekli" ve "logaritmik" tiplerin eksenleri için geçerlidir. + // breaks[] + // breakStyle + // categories + // color + // constantLines[] + // constantLineStyle + // customPosition + // customPositionAxis + // holidays + // inverted + // linearThreshold + // logarithmBase + // maxValueMargin + // minorGrid + // minorTick + // minorTickCount + // minorTickInterval + // minValueMargin + // minVisualRangeLength + // offset + // opecity + // placeholderSize + // singleWorkdays + // strips[] + // stripStyle + // tick + // tickInterval + // type + // valueMarginsEnabled + // visualRange + // visualRangeUpdateMode + // wholeRange + // workWeek + +} + diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartAxisGridDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartAxisGridDto.cs new file mode 100644 index 00000000..b076626e --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartAxisGridDto.cs @@ -0,0 +1,28 @@ +namespace Kurs.Platform.ListForms; + +public class ChartAxisGridDto +{ + /// Grid çizgilerinin rengini belirtir. + /// Bu özellik aşağıdaki renkleri destekler: + /// Hexadecimal colors + /// RGB colors + /// RGBA colors + /// Predefined/cross-browser color names + /// Predefined SVG colors + /// Paint server address + /// + public string Color { get; set; } = "#d3d3d3"; + /// Grid çizgilerini görünür yapar. + /// + public bool Visible { get; set; } + /// Grid çizgilerinin genişliğini piksel cinsinden belirtir. + /// + public int Width { get; set; } = 1; + + + ///// Grid çizgilerinin saydamlığını belirtir. + ///// 0 - 1 aralığındadır + ///// + //public double Opacity { get; set; } = 1; +} + diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartBorderDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartBorderDto.cs new file mode 100644 index 00000000..f3d22fa2 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartBorderDto.cs @@ -0,0 +1,40 @@ +using System.ComponentModel.DataAnnotations; + +namespace Kurs.Platform.ListForms; + +public class ChartBorderDto +{ + /// Legend in kenarlığını renklendirir. + /// Bu özellik aşağıdaki renkleri destekler: + /// Hexadecimal colors + /// RGB colors + /// RGBA colors + /// Predefined/cross-browser color names + /// Predefined SVG colors + /// Paint server address + /// + public string Color { get; set; } = "#d3d3d3"; + /// Legend in tüm köşelerini yuvarlatır. + /// + [Range(0, 100, ErrorMessage = "Value for {0} must be between {1} and {2}.")] + public int CornerRadius { get; set; } = 0; + /// Açıklamanın kenarlığı için bir tire stili ayarlar + /// Accepted Values: 'dash' | 'dot' | 'longDash' | 'solid' + /// Default Value: 'solid' + /// solid : Kenarlık düz, sürekli bir çizgidir + /// longDash : Kenarlık, uzun çizgiler kullanılarak görüntülenir + /// dash : Kenarlık, tireler kullanılarak görüntülenir + /// dot : Kenarlık noktalar kullanılarak görüntülenir + /// Any combination of 'longDash', 'dash' and 'dot : Kenarlık, belirtilen kombinasyon tekrarlanarak görüntülenir. Örneğin, 'dashdotdash'. + /// + public string DashStyle { get; set; } = "solid"; + ///// Açıklamanın kenarlığının saydamlığını belirtir + ///// Bu özellik, 0 ile 1 arasında bir değer kabul eder; burada 0, kenarlığı tamamen saydam, 1 ise opak yapar. + ///// + //[Range(0.1, 1, ErrorMessage = "Value for {0} must be between {1} and {2}.")] + //public double Opacity { get; set; } = 0.5; + public bool Visible { get; set; } + /// Açıklamanın kenarlığının genişliğini piksel cinsinden belirtir + /// + public int Width { get; set; } = 1; +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCommonAnnotationDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCommonAnnotationDto.cs new file mode 100644 index 00000000..e7204103 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCommonAnnotationDto.cs @@ -0,0 +1,100 @@ +namespace Kurs.Platform.ListForms; + +public class ChartCommonAnnotationDto +{ + public ChartCommonAnnotationDto() + { + Border = new ChartBorderDto(); + Font = new ChartFontDto(); + } + + /// Ek açıklamayı belirli bir bağımsız değişkene göre konumlandırır. + /// + public string Argument { get; set; } + /// Ek açıklamanın kenarlığının görünümünü yapılandırır. + /// + public ChartBorderDto Border { get; set; } + /// Ek açıklamayı dolduran rengi belirtir. + /// Bu özellik aşağıdaki renkleri destekler: + /// Hexadecimal colors + /// RGB colors + /// RGBA colors + /// Predefined/cross-browser color names + /// Predefined SVG colors + /// Paint server address + /// + public string Color { get; set; } = "#ffffff"; + /// Annotations'ın açıklamasını araç ipucunda belirtir. + /// + public string Description { get; set; } + public ChartFontDto Font { get; set; } + /// Ek açıklamanın yüksekliğini piksel cinsinden belirtir. + /// + public int Height { get; set; } = -1; + /// Açıklamada görüntülenecek görüntüyü yapılandırır. Yalnızca tür "görüntü" ise geçerlidir. + /// + public string Image { get; set; } + /// Ek açıklamayı yatay olarak taşır. + /// Bu özelliğe atanan sayı, piksel cinsinden kaymayı belirtir. Negatif bir sayı notu sola kaydırır ve pozitif bir sayı onu sağa kaydırır. + /// + public int OffsetX { get; set; } = -1; + /// Ek açıklamayı dikey olarak taşır. + /// Bu özelliğe atanan sayı, piksel cinsinden kaymayı belirtir. Negatif bir sayı ek açıklamayı yukarı kaydırır ve pozitif bir sayı onu aşağı kaydırır. + /// + public int OffsetY { get; set; } = -1; + /// Ek açıklamanın metni veya görüntüsü (piksel olarak belirtilir) çevresinde boş bir alan oluşturmak için paddingTopBottom ile birlikte kullanılır. + /// + public int PaddingLeftRight { get; set; } = 10; + /// paddingLeftRight ile birlikte, ek açıklama metninin veya görüntüsünün çevresinde boş bir alan oluşturur; piksel cinsinden belirtilir. + /// + public int PaddingTopBottom { get; set; } = 10; + /// Ek açıklamayı bir seri noktasına tutturur. Nokta dizisinin adını kabul eder. + /// + public string Series { get; set; } + /// Ek açıklamanın metnini belirtir. Yalnızca tür "metin" ise geçerlidir. + /// + public string Text { get; set; } + /// Ek açıklama araç ipucunun etkin olup olmadığını belirtir. + /// + public bool TooltipEnabled { get; set; } = true; + /// Ek açıklamanın metin mi, resim mi yoksa şablon mu görüntülediğini belirtir. Bu gerekli bir ayardır. + /// Accepted Values: 'text' | 'image' | 'custom' + /// Default Value: undefined + /// + public string Type { get; set; } + /// Ek açıklamayı belirtilen değer eksenindeki bir değere göre konumlandırır. + /// + public string Value { get; set; } + /// Ek açıklamanın genişliğini piksel cinsinden belirtir. + /// + public int Width { get; set; } + /// Ek açıklama metninin tek bir satıra sığmaması durumunda nasıl kaydırılacağını belirtir. + /// Accepted Values: 'normal' | 'breakWord' | 'none' + /// normal : Metin yalnızca izin verilen kesme noktalarında (örneğin, iki kelime arasındaki boşluk) kesiliyor. + /// breakWord : Words can be broken if there are no available breakpoints in the line. + /// none : Sözcük kaydırma devre dışı. + /// + public string WordWrap { get; set; } = "normal"; + /// Ek açıklamanın merkezini belirli bir piksel koordinatına konumlandırmak için y ile birlikte kullanılır. (0, 0), UI bileşeninin sol üst köşesidir. + /// + public int X { get; set; } + /// Ek açıklamanın merkezini belirli bir piksel koordinatına konumlandırmak için x ile birlikte kullanılır. (0, 0), UI bileşeninin sol üst köşesidir. + /// + public int Y { get; set; } + + // allowDragging + // arrowLength + // arrowWidth + // axis + // component + // customizeTooltip + // data + // opacity + // render for react + // shadow {} + // template + // textOverflow + // tooltipComponent for react + // tooltipRender + // tooltipTemplate +} diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCommonAxisDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCommonAxisDto.cs new file mode 100644 index 00000000..d8954c48 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCommonAxisDto.cs @@ -0,0 +1,45 @@ +namespace Kurs.Platform.ListForms; + +/// +/// +/// +public class ChartCommonAxisDto +{ + public ChartCommonAxisDto() + { + Grid = new ChartAxisGridDto(); + } + + public ChartAxisGridDto Grid { get; set; } + /// Ana eksen işaretlerinin görünümünü yapılandırır. + /// Şimdilik sadece string olaran implemen edildi, ihtiyaç olması durumunda ChartTitleDto benzeri bir nesne ile değiştirilebilir + /// + public string Title { get; set; } + /// Eksen çizgisini görünür yapar. + /// + public bool Visible { get; set; } = true; + /// Eksen çizgisinin genişliğini piksel cinsinden belirtir. + /// + public int Width { get; set; } = 1; + + // ihtiyaç olunca açılacak proptert ler + + // aggregatedPointsPosition + // allowDecimals + // breakStyle {} + // color + // constantLineStyle {} + // discreteAxisDivisionMode + // endOnTick + // inverted + // label {} + // maxValueMargin + // minorGrid {} + // minorTick {} + // minValueMargin + // opacity + // placeholderSize + // stripStyle {} + // tick {} + // valueMarginsEnabled +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCommonDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCommonDto.cs new file mode 100644 index 00000000..38c59f03 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCommonDto.cs @@ -0,0 +1,60 @@ +namespace Kurs.Platform.ListForms; + +public class ChartCommonDto +{ + /// Bağımsız değişken ekseni yakınlaştırılırken veya kaydırılırken değer ekseninin visualRange değerinin ayarlanıp ayarlanmadığını belirtir. + /// + public bool AdjustOnZoom { get; set; } = true; + /// Grafik kabının arka planını renklendirir. + /// Not: HiddenInput olarak etiketlenmesinin sebebi renk seçimi için farklı bir editör kullanılmasından dolayıdır + /// Default Value: '#FFFFFF' + /// + public string ContainerBackgroundColor { get; set; } = "#FFFFFF"; + /// Serileri ve öğelerini renklendirmek için kullanılacak paleti ayarlar. + /// Accepted Values: 'Bright' | 'Harmony Light' | 'Ocean' | 'Pastel' | 'Soft' | 'Soft Pastel' | 'Vintage' | 'Violet' | 'Carmine' | 'Dark Moon' | 'Dark Violet' | 'Green Mist' | 'Soft Blue' | 'Material' | 'Office' + /// Default Value: 'Material' + /// + public string Palette { get; set; } = "Material"; + /// Sayıları seri sayısından (Chart UI bileşeninde) veya bir serideki noktalardan (PieChart UI bileşeninde) az olduğunda, paletteki renklerle ne yapılacağını belirtir. + /// Accepted Values: 'alternate' | 'blend' | 'extrapolate' + /// Default Value: 'blend' + /// blend : İki komşu rengin bir karışımını oluşturur ve paletteki bu renklerin arasına ekler. + /// alternate : Sırayla normal, açık ve koyu tonlarını değiştirerek tüm palet renklerini tekrarlar. + /// extrapolate : Gölgelerini yavaş yavaş karanlıktan aydınlığa değiştirerek tüm palet renklerini tekrarlar. + /// + public string PaletteExtensionMode { get; set; } = "blend"; + + /// PanesDto dolu ise hangisinin default olduğunu belirleyen isimdir. PanesDto[0].name ismi + /// + public string DefaultPane { get; set; } + /// UI bileşeninin kullanıcı etkileşimine yanıt verip vermediğini belirtir. + /// + public bool Disabled { get; set; } + /// UI bileşeninin kullandığı temanın adını ayarlar. + /// Accepted Values: 'generic.dark' | 'generic.light' | 'generic.contrast' | 'generic.carmine' | 'generic.darkmoon' | 'generic.darkviolet' | 'generic.greenmist' | 'generic.softblue' | 'material.blue.light' | 'material.lime.light' | 'material.orange.light' | 'material.purple.light' | 'material.teal.light' + /// + public string Theme { get; set; } = "generic.light"; + + // diğer eklenebilecek property ler + + // autoHidePointMarkers + // barGroupPadding + // barGroupWidth + // customizeAnnotation + // customizeLabel + // customizePoint + // elementAttr + // maxBubbleSize + // minBubbleSize + // negativesAsZeroes + // pathModified + // pointSelectionMode + // redrawOnResize + // resizePanesOnZoom + // resolveLabelOverlapping + // rotated + // rtlEnabled + // seriesSelectionMode + // stickyHovering + // synchronizeMultiAxes +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCommonPaneDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCommonPaneDto.cs new file mode 100644 index 00000000..3d4fde54 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCommonPaneDto.cs @@ -0,0 +1,20 @@ +namespace Kurs.Platform.ListForms; + +/// Bir grafikteki tüm bölmeler için ortak ayarları tanımlar. +/// +public class ChartCommonPaneDto +{ + /// Bölmenin arka planının rengini belirtir. + /// Bu özellik aşağıdaki renkleri destekler: + /// Hexadecimal colors + /// RGB colors + /// RGBA colors + /// Predefined/cross-browser color names + /// Predefined SVG colors + /// Paint server address + /// + public string BackgroundColor { get; set; } + + //public PaneBorderDto Border { get; set; } // TODO + +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCommonSeriesSettingsDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCommonSeriesSettingsDto.cs new file mode 100644 index 00000000..670cf1b1 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCommonSeriesSettingsDto.cs @@ -0,0 +1,147 @@ +namespace Kurs.Platform.ListForms; + +/// Grafikteki tüm seriler için ortak olan ayarları belirtir. +/// +public class ChartCommonSeriesSettingsDto +{ + /// Hangi veri kaynağı alanının seri noktaları için bağımsız değişkenler sağladığını belirtir + /// Default Value: 'arg' + /// Temaler ile kullanılamaz! + /// + public string ArgumentField { get; set; } = "arg"; + /// Seriyi bir değer eksenine bağlar. + /// + public string Axis { get; set; } + /// Aynı bağımsız değişkene sahip çubukların üst üste binmesi için çubuk serilerini gruplandırmanıza izin verir. + /// Bu üye şu seriler tarafından kullanılır: BarSeries, RangeBarSeries + /// + public string BarOverlapGroup { get; set; } + /// Göreli birimleri kullanarak bir serideki tüm çubukların dolgusunu ve dolayısıyla genişliğini kontrol eder. barWidth özelliği ayarlanmışsa yoksayılır. + /// Bu üye şu seriler tarafından kullanılır: BarSeries, StackedBarSeries, FullStackedBarSeries, RangeBarSeries + /// + public int BarPadding { get; set; } + /// Bir dizideki tüm çubuklar için piksel cinsinden ölçülen sabit bir genişlik belirtir. barPadding özelliğine göre önceliklidir. + /// Bu üye şu seriler tarafından kullanılır: BarSeries, StackedBarSeries, FullStackedBarSeries, RangeBarSeries + /// + public int BarWidth { get; set; } + /// Serinin rengini belirtir. + /// Bu özellik aşağıdaki renkleri destekler: + /// Hexadecimal colors + /// RGB colors + /// RGBA colors + /// Predefined/cross-browser color names + /// Predefined SVG colors + /// Paint server address + /// + public string Color { get; set; } + /// Çubukların yuvarlak görünmesini sağlar. Yalnızca çubuk benzeri seriler için geçerlidir. + /// Default Value: 0 + /// Bu üye şu seriler tarafından kullanılır: BarSeries, StackedBarSeries, FullStackedBarSeries, RangeBarSeries + /// + public int CornerRadius { get; set; } = 0; + /// Açıklamanın kenarlığı için bir tire stili ayarlar + /// Accepted Values: 'dash' | 'dot' | 'longDash' | 'solid' + /// Default Value: 'solid' + /// solid : Kenarlık düz, sürekli bir çizgidir + /// longDash : Kenarlık, uzun çizgiler kullanılarak görüntülenir + /// dash : Kenarlık, tireler kullanılarak görüntülenir + /// dot : Kenarlık noktalar kullanılarak görüntülenir + /// Any combination of 'longDash', 'dash' and 'dot : Kenarlık, belirtilen kombinasyon tekrarlanarak görüntülenir. Örneğin, 'dashdotdash'. + /// + public string DashStyle { get; set; } = "solid"; + /// Serinin boş veri noktalarını göz ardı edip etmeyeceğini belirtir. + /// Boş değere sahip veri noktaları, gerçek seri noktaları üretmez. Bu nedenle eksik olması gereken yerlerde gereksiz boşluklarla seriler çizilebilir. Bu boşlukları kaldırmak için, ignoreEmptyPoints özelliğini true olarak ayarlayın. + /// + public bool IgnoreEmptyPoints { get; set; } = false; + /// Serinin hangi bölmeye ait olması gerektiğini belirtir. Bölmenin adını kabul eder. + /// Bilgilendirme: Pane dolu ise chart ın PanesDto Property si aynı isimde bir elemanı mutlaka içermelidir + /// + public string Pane { get; set; } + + /// rangeValue2Field özelliğiyle birleştiğinde, hangi veri kaynağı alanının aralık benzeri bir seri için değerler sağladığını belirtir. + /// Bu üye aşağıdaki seriler tarafından kullanılır: + /// RangeBarSeries, RangeAreaSeries + /// + public string RangeValue1Field { get; set; } = "val1"; + /// rangeValue1Field özelliğiyle birleştiğinde, hangi veri kaynağı alanının aralık benzeri bir seri için değerler sağladığını belirtir. + /// Bu üye aşağıdaki seriler tarafından kullanılır: + /// RangeBarSeries, RangeAreaSeries + /// + public string RangeValue2Field { get; set; } = "val2"; + /// Kullanıcı bir dizi seçtiğinde vurgulanacak dizi öğelerini belirtir. + /// Accepted Values: 'allArgumentPoints' | 'allSeriesPoints' | 'excludePoints' | 'includePoints' | 'none' | 'onlyPoint' + /// Seri tipine bağlı olarak bu özellik farklı değerler kabul eder. Bilgi için SeriTipleri bölümünü (https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxChart/Series_Types/) ziyaret edin, kullanılan seri tipini seçin ve onun selectionMode özellik açıklamasına bakın + /// + public string SelectionMode { get; set; } = "none"; + /// Dizinin lejantta gösterilip gösterilmeyeceğini belirtir. + /// + public bool ShowInLegend { get; set; } = true; + /// Seri türünü ayarlar + /// Default Value: 'line' + /// Accepted Values: 'area' | 'bar' | 'bubble' | 'candlestick' | 'fullstackedarea' | 'fullstackedbar' | 'fullstackedline' | 'fullstackedspline' | 'fullstackedsplinearea' | 'line' | 'rangearea' | 'rangebar' | 'scatter' | 'spline' | 'splinearea' | 'stackedarea' | 'stackedbar' | 'stackedline' | 'stackedspline' | 'stackedsplinearea' | 'steparea' | 'stepline' | 'stock' + /// + public string Type { get; set; } + /// Hangi veri kaynağı alanının seri noktaları için değerler sağladığını belirtir. + /// Bu üye aşağıdaki seriler tarafından kullanılır: + /// LineSeries, StackedLineSeries,FullStackedLineSeries,StackedSplineSeries,FullStackedSplineSeries, + /// SplineSeries,StepLineSeries,AreaSeries,StackedAreaSeries,Sta,kedSplineAreaSeries,FullStackedAreaSeries, + /// FullStackedSplineAreaSeries,SplineAreaSeries,StepAreaSeries,ScatterSeries,BarSeries,StackedBarSeries, + /// FullStackedBarSeries,BubbleSeries, + /// + public string ValueField { get; set; } + /// Serinin görünür olup olmayacağını belirtir. + /// + public bool Visible { get; set; } = true; + /// Seri çizgisinin genişliğini piksel cinsinden belirtir. Yalnızca çizgi benzeri seriler için geçerlidir. + /// Default Value: 2 + /// Bu üye aşağıdaki seriler tarafından kullanılır: + /// LineSeries, StackedLineSeries, FullStackedLineSeries, StackedSplineSeries, FullStackedSplineSeries, SplineSeries, StepLineSeries, CandleStickSeries, StockSeries + /// + public int Width { get; set; } = 2; + + // aggregation {} + // area {} + // bar {} + // border {} + // bubble {} + // candlestick {} + // closeValueField // for financial series + // fullstackedarea {} + // fullstackedbar {} + // fullstackedline {} + // fullstackedspline {} + // fullstackedsplinearea {} + // highValueField + // hoverMode + // hoverStyle + // innerColor + // label {} + // line {} + // lowValueField + // maxLabelCount + // minBarSize + // opacity + // openValueField + // point {} + // rangearea {} + // rangebar {} + // reduction {} // financial seriler için indirgeme özelliklerini belirtir. + // scatter {} + // slectionStyle // Bir kullanıcı seçtiğinde seri tarafından benimsenen görünümü yapılandırır. + // sizeField + // spline {} + // splinearea {} + // stack {} + // stackedarea {} + // stackedbar {} + // stackedline {} + // stackedspline{} + // stackedsplinearea {} + // steparea {} + // stepline {} + // stock {} + // tagField + // valueErrorBar + + public ChartLabelDto Label { get; set; } +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCrosshairDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCrosshairDto.cs new file mode 100644 index 00000000..173a35d1 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCrosshairDto.cs @@ -0,0 +1,52 @@ +namespace Kurs.Platform.ListForms; + +public class ChartCrosshairDto +{ + public ChartCrosshairDto() + { + HorizontalLine = new ChartCrosshairLineDto(); + Label = new ChartLabelDto(); + VerticalLine = new ChartCrosshairLineDto(); + } + + /// Artı işareti çizgilerinin rengini belirtir. + /// Bu özellik aşağıdaki renkleri destekler: + /// Hexadecimal colors + /// RGB colors + /// RGBA colors + /// Predefined/cross-browser color names + /// Predefined SVG colors + /// Paint server address + /// + public string Color { get; set; } = "#f05b41"; + /// Artı işareti çizgilerinin kısa çizgi stilini belirtir. + /// Accepted Values: 'dash' | 'dot' | 'longDash' | 'solid' + /// Default Value: 'solid' + /// solid : Kenarlık düz, sürekli bir çizgidir + /// longDash : Kenarlık, uzun çizgiler kullanılarak görüntülenir + /// dash : Kenarlık, tireler kullanılarak görüntülenir + /// dot : Kenarlık noktalar kullanılarak görüntülenir + /// Any combination of 'longDash', 'dash' and 'dot : Kenarlık, belirtilen kombinasyon tekrarlanarak görüntülenir. Örneğin, 'dashdotdash'. + /// + public string DashStyle { get; set; } = "dot"; + /// Artı işaretini etkinleştirir. + /// + public bool Enabled { get; set; } + ///// Sürükleme kutusunun saydamlığını belirtir. + ///// 0 - 1 aralığındadır + ///// + //public double Opacity { get; set; } = 1; + /// Artı işareti çizgilerinin genişliğini belirtir. + /// + public int Width { get; set; } = 1; + + /// Yatay çapraz çizgiyi ayrı ayrı yapılandırır. + /// + public ChartCrosshairLineDto HorizontalLine { get; set; } + /// Artı işareti etiketlerini yapılandırır. + /// + public ChartLabelDto Label { get; set; } + /// Dikey artı çizgisini ayrı ayrı yapılandırır. + /// + public ChartCrosshairLineDto VerticalLine { get; set; } +} diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCrosshairLineDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCrosshairLineDto.cs new file mode 100644 index 00000000..6a8aaae4 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartCrosshairLineDto.cs @@ -0,0 +1,16 @@ +namespace Kurs.Platform.ListForms; + +public class ChartCrosshairLineDto +{ + public ChartCrosshairLineDto() + { + Label = new ChartLabelDto(); + } + + public string Color { get; set; } = "#f05b41"; + public string DashStyle { get; set; } = "dot"; + public ChartLabelDto Label { get; set; } + //public double Opacity { get; set; } = 0.5; + public bool Visible { get; set; } = true; + public int Width { get; set; } = 1; +} diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartDataRequestDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartDataRequestDto.cs new file mode 100644 index 00000000..ceed4cd5 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartDataRequestDto.cs @@ -0,0 +1,11 @@ +using System.ComponentModel.DataAnnotations; + +namespace Kurs.Platform.ListForms; + +public class ChartDataRequestDto +{ + [Required] + public string ListFormCode { get; set; } + + public string Filter { get; set; } +} diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartDataSourceDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartDataSourceDto.cs new file mode 100644 index 00000000..c8abed20 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartDataSourceDto.cs @@ -0,0 +1,6 @@ +namespace Kurs.Platform.ListForms; + +public class ChartDataSourceDto +{ + public string Query { get; set; } +} diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartDragBoxStyle.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartDragBoxStyle.cs new file mode 100644 index 00000000..9121df43 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartDragBoxStyle.cs @@ -0,0 +1,20 @@ +namespace Kurs.Platform.ListForms; + +public class ChartDragBoxStyle +{ + /// Sürükleme kutusunun rengini belirtir. + /// Bu özellik aşağıdaki renkleri destekler: + /// Hexadecimal colors + /// RGB colors + /// RGBA colors + /// Predefined/cross-browser color names + /// Predefined SVG colors + /// Paint server address + /// + public string Color { get; set; } + /// Sürükleme kutusunun saydamlığını belirtir. + /// 0 - 1 aralığındadır + /// + public double Opacity { get; set; } +} + diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartExportDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartExportDto.cs new file mode 100644 index 00000000..5b1ad71d --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartExportDto.cs @@ -0,0 +1,33 @@ +namespace Kurs.Platform.ListForms; + +public class ChartExportDto +{ + /// Ortaya çıkan dosya veya belgedeki saydam bölgeleri dolduracak rengi belirtir. + /// Bu özellik aşağıdaki renkleri destekler: + /// Hexadecimal colors + /// RGB colors + /// RGBA colors + /// Predefined/cross-browser color names + /// Predefined SVG colors + /// Paint server address + /// + public string BackgroundColor { get; set; } = "#ffffff"; + /// UI bileşeninde istemci tarafında dışa aktarmayı etkinleştirir. + /// + public bool Enabled { get; set; } + ///// Dışa aktarma formatı belirtir. + ///// Desteklenen formatlar: 'GIF' | 'JPEG' | 'PDF' | 'PNG' | 'SVG' + ///// + //public string Formats { get; set; } = "['PNG', 'PDF', 'JPEG', 'SVG', 'GIF']"; + + /// Dışa aktarılan UI bileşeninin etrafına boş bir alan ekler; piksel cinsinden ölçülür. + /// + public int Margin { get; set; } = 10; + /// UI bileşeninde yazdırma özelliğini etkinleştirir. Yalnızca export.enabled özelliği doğruysa geçerlidir. /// + /// + public bool PrintingEnabled { get; set; } = true; + + // svgToCanvas // HTML tuvalinde SVG işaretlemesini işleyen bir işlev. Özel SVG öğelerini (örneğin, markerTemplate) dışa aktarmak için gereklidir. +} + + diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartFontDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartFontDto.cs new file mode 100644 index 00000000..98f3bcec --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartFontDto.cs @@ -0,0 +1,32 @@ +namespace Kurs.Platform.ListForms; + +/// Artı işareti etiketleri için yazı tipi özelliklerini belirtir. +/// +public class ChartFontDto +{ + /// Yazı tipi rengini belirtir. + /// Bu özellik aşağıdaki renkleri destekler: + /// Hexadecimal colors + /// RGB colors + /// RGBA colors + /// Predefined/cross-browser color names + /// Predefined SVG colors + /// Paint server address + /// + public string Color { get; set; } = "#FFFFFF"; + /// Yazı tipi ailesini belirtir. + /// Default Value: '"Segoe UI", "Helvetica Neue", "Trebuchet MS", Verdana, sans-serif' + /// + public string Family { get; set; } = "\"Segoe UI\", \"Helvetica Neue\", \"Trebuchet MS\", Verdana, sans-serif"; + ///// Yazı tipi saydamlığını belirtir. + ///// 0 - 1 aralığındadır + ///// + //public double Opacity { get; set; } = 1; + /// Yazı tipi boyutunu belirtir. + /// + public int Size { get; set; } = 12; + /// + /// Yazı tipi ağırlığını belirtir. 100'lük artışlarla 100 ile 900 arasındaki değerleri kabul eder. Daha yüksek değerler kalınlığı artırır. + /// + public int Weight { get; set; } = 400; +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartJsonItemRowDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartJsonItemRowDto.cs new file mode 100644 index 00000000..99b56dd3 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartJsonItemRowDto.cs @@ -0,0 +1,13 @@ +namespace Kurs.Platform.ListForms; + +public class ChartJsonItemRowDto +{ + public string Id { get; set; } + public string ListFormCode { get; set; } + public int Index { get; set; } + public string FieldName { get; set; } + public ChartAnnotationDto ItemAnnotation { get; set; } + public ChartPanesDto ItemPane { get; set; } + public ChartSeriesDto ItemSerie { get; set; } + public ChartValueAxisDto ItemAxis { get; set; } +} diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartLabelDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartLabelDto.cs new file mode 100644 index 00000000..de40eb8a --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartLabelDto.cs @@ -0,0 +1,32 @@ +namespace Kurs.Platform.ListForms; + +public class ChartLabelDto +{ + public ChartLabelDto() + { + Font = new ChartFontDto(); + } + + /// Etiketin arka planını boyar. + /// Bu özellik aşağıdaki renkleri destekler: + /// Hexadecimal colors + /// RGB colors + /// RGBA colors + /// Predefined/cross-browser color names + /// Predefined SVG colors + /// Paint server address + /// + public string BackgroundColor { get; set; } = "#f05b41"; + /// görüntülenen metni özelleştirir. + /// Temalarda kullanılamaz. + /// + public string CustomizeText { get; set; } + public ChartFontDto Font { get; set; } + public bool Visible { get; set; } + /// Artı işareti etiketinde görüntülenmeden önce bir nokta değerini/bağımsız değişkeni biçimlendirir. /// + /// Accepted Values: 'billions' | 'currency' | 'day' | 'decimal' | 'exponential' | 'fixedPoint' | 'largeNumber' | 'longDate' | 'longTime' | 'millions' | 'millisecond' | 'month' | 'monthAndDay' | 'monthAndYear' | 'percent' | 'quarter' | 'quarterAndYear' | 'shortDate' | 'shortTime' | 'thousands' | 'trillions' | 'year' | 'dayOfWeek' | 'hour' | 'longDateLongTime' | 'minute' | 'second' | 'shortDateShortTime' + /// + public string Format { get; set; } + +} + diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartLegendDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartLegendDto.cs new file mode 100644 index 00000000..cb65db50 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartLegendDto.cs @@ -0,0 +1,71 @@ +namespace Kurs.Platform.ListForms; + +public class ChartLegendDto +{ + public ChartLegendDto() + { + Border = new ChartBorderDto(); + } + + /// Legend in arka planını renklendirir + /// Default Value: undefined + /// Bu özellik aşağıdaki renkleri destekler: + /// Hexadecimal colors + /// RGB colors + /// RGBA colors + /// Predefined/cross-browser color names + /// Predefined SVG colors + /// Paint server address + /// + public string BackgroundColor { get; set; } + /// Legend in kenarlığını yapılandırır + /// + public ChartBorderDto Border { get; set; } + public int ColumnCount { get; set; } + /// Gösterge öğelerini dikey (bir sütunda) veya yatay (bir satırda) olarak düzenler. legend.horizontalAlignment "center" ise varsayılan değer "horizontal" olur. Aksi takdirde, "dikey" dir + /// Accepted Values: 'horizontal' | 'vertical' + /// + public string Orientation { get; set; } = "vertical"; + /// Göstergenin grafiğin çiziminin dışında mı yoksa içinde mi bulunduğunu belirtir + /// Accepted Values: 'inside' | 'outside' + /// + public string Position { get; set; } = "outside"; + /// Gösterge öğelerini birkaç sıra halinde düzenler. + /// + public int RowCount { get; set; } = 0; + /// Açıklama başlığını yapılandırır + /// ihtiyaç olması durumunda detaylandırmak için TitleDto ile değiştirilebilir + /// + public string Title { get; set; } + /// Göstergenin görünürlüğünü belirtir + /// + public bool Visible { get; set; } = true; + + ////İhtiyaç olması durumunda açılacak diğer property ler + + ///// horizontalAlignment ile birlikte göstergenin konumunu belirtir + ///// Accepted Values: 'bottom' | 'top' + ///// + //public string VerticalAlignment { get; set; } = "top"; + //public int RowItemSpacing { get; set; } = 8; + //public int PaddingTopBottom { get; set; } = 10; + //public int PaddingLeftRight { get; set; } = 10; + //public string MarkerTemplate { get; set; } + //public string MarkerSize { get; set; } + //public string MarkerRender { get; set; } + //public string MarkerComponent { get; set; } + //public string Margin { get; set; } + //public string ItemTextPosition { get; set; } + //public string ItemsAlignment { get; set; } + //public string HoverMode { get; set; } + //public string HorizontalAlignment { get; set; } + //public string CustomizeText { get; set; } + //public string CustomizeItems { get; set; } + //public string CustomizeHint { get; set; } + ///// Öğe sütunları arasında piksel cinsinden boş bir alan belirtir + ///// + //public int ColumnItemSpacing { get; set; } = 20; + +} + + diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartMarginDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartMarginDto.cs new file mode 100644 index 00000000..9d30e934 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartMarginDto.cs @@ -0,0 +1,9 @@ +namespace Kurs.Platform.ListForms; + +public class ChartMarginDto +{ + public int Bottom { get; set; } + public int Left { get; set; } + public int Right { get; set; } + public int Top { get; set; } +} diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartOptionsRequestDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartOptionsRequestDto.cs new file mode 100644 index 00000000..a4e0e980 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartOptionsRequestDto.cs @@ -0,0 +1,7 @@ +namespace Kurs.Platform.ListForms; + +public class ChartOptionsRequestDto +{ + public string ListFormCode { get; set; } +} + diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartPanesDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartPanesDto.cs new file mode 100644 index 00000000..93b2fdc5 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartPanesDto.cs @@ -0,0 +1,18 @@ +namespace Kurs.Platform.ListForms; + +/// Bölme, dizi içeren bir grafik alanıdır. Bir grafikte çok sayıda seri varsa, bunlar birden çok bölme arasında dağıtılabilir. +/// +public class ChartPanesDto +{ + /// Bölmenin arka planının rengini belirtir. + /// + public string BackgroundColor { get; set; } + /// Çok bölmeli bir grafikte bölmenin yüksekliğini (veya grafik döndürüldüğünde genişliğini) belirtir. + /// + public int Height { get; set; } = 250; + /// Bölmenin adını belirtir. + /// + public string Name { get; set; } + + //public PaneBorderDto Border { get; set; } +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartScrollBarDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartScrollBarDto.cs new file mode 100644 index 00000000..20e6af5d --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartScrollBarDto.cs @@ -0,0 +1,36 @@ +namespace Kurs.Platform.ListForms; + +public class ChartScrollBarDto +{ + /// ScrollBar ın kenarlığını renklendirir. + /// Bu özellik aşağıdaki renkleri destekler: + /// Hexadecimal colors + /// RGB colors + /// RGBA colors + /// Predefined/cross-browser color names + /// Predefined SVG colors + /// Paint server address + /// + public string Color { get; set; } = "gray"; + /// Kaydırma çubuğu ile grafiğin çizimi arasındaki boşluğu piksel cinsinden belirtir. + /// + public int Offset { get; set; } = 5; + + ///// Kaydırma çubuğunun opaklığını belirtir. + ///// + ///// + //public double Opacity { get; set; } + + /// Grafikteki kaydırma çubuğunun konumunu belirtir. + /// Accepted Values: 'bottom' | 'left' | 'right' | 'top' + /// Default Value: 'top' + /// Grafiğin döndürülüp döndürülmediğine bağlı olarak bu özellik farklı değerler kabul eder. Döndürülmemiş bir grafikte, bu özelliğe 'üst' veya 'alt' atayabilirsiniz. Döndürülmüş bir grafikte, bu özellik ya 'sol' ya da 'sağ'ı kabul eder. + /// + public string Position { get; set; } = "top"; + /// Kaydırma çubuğunun görünüp görünmeyeceğini belirtir. + /// + public bool Visible { get; set; } + /// Kaydırma çubuğunun genişliğini piksel cinsinden belirtir. + /// + public int Width { get; set; } = 10; +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartSeriesDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartSeriesDto.cs new file mode 100644 index 00000000..21aa88ae --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartSeriesDto.cs @@ -0,0 +1,124 @@ +namespace Kurs.Platform.ListForms; + +public class ChartSeriesDto +{ + /// Hangi veri kaynağı alanının seri noktaları için bağımsız değişkenler sağladığını belirtir + /// Default Value: 'arg' + /// Temalar ile kullanılamaz! + /// + public string ArgumentField { get; set; } = "arg"; + /// Seriyi bir değer eksenine bağlar. + /// + public string Axis { get; set; } + /// Aynı bağımsız değişkene sahip çubukların üst üste binmesi için çubuk serilerini gruplandırmanıza izin verir. + /// Bu üye şu seriler tarafından kullanılır: BarSeries, RangeBarSeries + /// + public string BarOverlapGroup { get; set; } + /// Göreli birimleri kullanarak bir serideki tüm çubukların dolgusunu ve dolayısıyla genişliğini kontrol eder. barWidth özelliği ayarlanmışsa yoksayılır. + /// Bu üye şu seriler tarafından kullanılır: BarSeries, StackedBarSeries, FullStackedBarSeries, RangeBarSeries + /// + public int BarPadding { get; set; } + /// Bir dizideki tüm çubuklar için piksel cinsinden ölçülen sabit bir genişlik belirtir. barPadding özelliğine göre önceliklidir. + /// Bu üye şu seriler tarafından kullanılır: BarSeries, StackedBarSeries, FullStackedBarSeries, RangeBarSeries + /// + public int BarWidth { get; set; } + /// Serinin rengini belirtir. + /// Not: HiddenInput olarak etiketlenmesinin sebebi renk seçimi için farklı bir editör kullanılmasından dolayıdır + /// Bu özellik aşağıdaki renkleri destekler: + /// Hexadecimal colors + /// RGB colors + /// RGBA colors + /// Predefined/cross-browser color names + /// Predefined SVG colors + /// Paint server address + /// + public string Color { get; set; } + /// Çubukların yuvarlak görünmesini sağlar. Yalnızca çubuk benzeri seriler için geçerlidir. + /// Default Value: 0 + /// Bu üye şu seriler tarafından kullanılır: BarSeries, StackedBarSeries, FullStackedBarSeries, RangeBarSeries + /// + public int CornerRadius { get; set; } = 0; + /// Açıklamanın kenarlığı için bir tire stili ayarlar + /// Accepted Values: 'dash' | 'dot' | 'longDash' | 'solid' + /// Default Value: 'solid' + /// solid : Kenarlık düz, sürekli bir çizgidir + /// longDash : Kenarlık, uzun çizgiler kullanılarak görüntülenir + /// dash : Kenarlık, tireler kullanılarak görüntülenir + /// dot : Kenarlık noktalar kullanılarak görüntülenir + /// Any combination of 'longDash', 'dash' and 'dot : Kenarlık, belirtilen kombinasyon tekrarlanarak görüntülenir. Örneğin, 'dashdotdash'. + /// + public string DashStyle { get; set; } = "solid"; + /// Serinin boş veri noktalarını göz ardı edip etmeyeceğini belirtir. + /// Boş değere sahip veri noktaları, gerçek seri noktaları üretmez. Bu nedenle eksik olması gereken yerlerde gereksiz boşluklarla seriler çizilebilir. Bu boşlukları kaldırmak için, ignoreEmptyPoints özelliğini true olarak ayarlayın. + /// + public bool IgnoreEmptyPoints { get; set; } = false; + + /// Seriyi tanımlayan adı belirtir. + /// + public string Name { get; set; } + /// Serinin hangi bölmeye ait olması gerektiğini belirtir. Bölmenin adını kabul eder. + /// Bilgilendirme: Pane dolu ise chart ın PanesDto Property si aynı isimde bir elemanı mutlaka içermelidir + /// + public string Pane { get; set; } + /// rangeValue2Field özelliğiyle birleştiğinde, hangi veri kaynağı alanının aralık benzeri bir seri için değerler sağladığını belirtir. + /// Bu üye aşağıdaki seriler tarafından kullanılır: + /// RangeBarSeries, RangeAreaSeries + /// + public string RangeValue1Field { get; set; } = "val1"; + /// rangeValue1Field özelliğiyle birleştiğinde, hangi veri kaynağı alanının aralık benzeri bir seri için değerler sağladığını belirtir. + /// Bu üye aşağıdaki seriler tarafından kullanılır: + /// RangeBarSeries, RangeAreaSeries + /// + public string RangeValue2Field { get; set; } = "val2"; + /// Kullanıcı bir dizi seçtiğinde vurgulanacak dizi öğelerini belirtir. + /// Accepted Values: 'allArgumentPoints' | 'allSeriesPoints' | 'excludePoints' | 'includePoints' | 'none' | 'onlyPoint' + /// Seri tipine bağlı olarak bu özellik farklı değerler kabul eder. Bilgi için SeriTipleri bölümünü (https://js.devexpress.com/Documentation/ApiReference/UI_Components/dxChart/Series_Types/) ziyaret edin, kullanılan seri tipini seçin ve onun selectionMode özellik açıklamasına bakın + /// + public string SelectionMode { get; set; } = "none"; + /// Dizinin lejantta gösterilip gösterilmeyeceğini belirtir. + /// + public bool ShowInLegend { get; set; } = true; + /// Seri türünü ayarlar + /// Default Value: 'line' + /// Accepted Values: 'area' | 'bar' | 'bubble' | 'candlestick' | 'fullstackedarea' | 'fullstackedbar' | 'fullstackedline' | 'fullstackedspline' | 'fullstackedsplinearea' | 'line' | 'rangearea' | 'rangebar' | 'scatter' | 'spline' | 'splinearea' | 'stackedarea' | 'stackedbar' | 'stackedline' | 'stackedspline' | 'stackedsplinearea' | 'steparea' | 'stepline' | 'stock' + /// + public string Type { get; set; } + /// Hangi veri kaynağı alanının seri noktaları için değerler sağladığını belirtir. + /// Bu üye aşağıdaki seriler tarafından kullanılır: + /// LineSeries, StackedLineSeries,FullStackedLineSeries,StackedSplineSeries,FullStackedSplineSeries, + /// SplineSeries,StepLineSeries,AreaSeries,StackedAreaSeries,Sta,kedSplineAreaSeries,FullStackedAreaSeries, + /// FullStackedSplineAreaSeries,SplineAreaSeries,StepAreaSeries,ScatterSeries,BarSeries,StackedBarSeries, + /// FullStackedBarSeries,BubbleSeries, + /// + public string ValueField { get; set; } + /// Serinin görünür olup olmayacağını belirtir. + /// + public bool Visible { get; set; } = true; + /// Seri çizgisinin genişliğini piksel cinsinden belirtir. Yalnızca çizgi benzeri seriler için geçerlidir. + /// Default Value: 2 + /// Bu üye aşağıdaki seriler tarafından kullanılır: + /// LineSeries, StackedLineSeries, FullStackedLineSeries, StackedSplineSeries, FullStackedSplineSeries, SplineSeries, StepLineSeries, CandleStickSeries, StockSeries + /// + public int Width { get; set; } = 2; + + // hoverStyle + // hoverMode + // highValueField // for financial series + // closeValueField // for financial series + // border Dto + // innerColor + // label Dto + // lowValueField + // maxLabelCount + // minBarSize + // openValueField + // point Dto + // reduction // financial seriler için indirgeme özelliklerini belirtir. + // slectionStyle // Bir kullanıcı seçtiğinde seri tarafından benimsenen görünümü yapılandırır. + // stack + // tag + // tagField + // valueErrorBar + + public ChartLabelDto Label { get; set; } +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartSizeDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartSizeDto.cs new file mode 100644 index 00000000..d7a4f578 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartSizeDto.cs @@ -0,0 +1,12 @@ +namespace Kurs.Platform.ListForms; + +public class ChartSizeDto +{ + public bool UseSize { get; set; } = false; + /// UI bileşeninin genişliğini piksel cinsinden belirtir + /// + public int Width { get; set; } = 400; + /// UI bileşeninin yüksekliğini piksel cinsinden belirtir + /// + public int Height { get; set; } = 200; +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartTitleDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartTitleDto.cs new file mode 100644 index 00000000..4a103bb6 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartTitleDto.cs @@ -0,0 +1,34 @@ +namespace Kurs.Platform.ListForms; + +public class ChartTitleDto +{ + /// Başlığın metnini belirtir + /// + public string Text { get; set; } + /// Dikey hizalamanın konumunu belirtir + /// Accepted Values: 'bottom' | 'top' + /// + public string VerticalAlignment { get; set; } = "top"; + /// Yatay yönde hizalamanın yanaşıklık konumunu belirtir + /// Accepted Values: 'center' | 'left' | 'right' + /// + public string HorizontalAlignment { get; set; } = "center"; + /// UI bileşeninin altyazısını yapılandırır + /// İhtiyaç olması durumunda alt özellikleri ile birlikte Objeye çevrilebilir + /// + public string Subtitle { get; set; } + /// WordWrap uygulandıktan sonra başlık ayrılan alandan taştığında başlıkla ne yapılacağını belirtir: + /// gizleme, kısaltma ve bir üç nokta görüntüleme veya hiçbir şey. + /// Accepted Values: 'ellipsis' | 'hide' | 'none' + /// + public string TextOverflow { get; set; } = "ellipsis"; + /// Tek bir satıra sığmazsa başlığın nasıl kaydırılacağını belirtir. + /// Accepted Values: 'normal' | 'breakWord' | 'none' + /// "normal" Metin yalnızca izin verilen kesme noktalarında (örneğin, iki kelime arasındaki boşluk) kesiliyor. + /// "breakWord" Satırda kullanılabilir kesme noktası yoksa sözcükler bölünebilir. + /// "none" Sözcük kaydırma devre dışı. + /// + public string WordWrap { get; set; } + + //Eklenebilir diğer alanlar: object font, object subtitle, object margin +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartTooltipDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartTooltipDto.cs new file mode 100644 index 00000000..6ccaf52a --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartTooltipDto.cs @@ -0,0 +1,73 @@ +namespace Kurs.Platform.ListForms; + +/// Araç ipuçlarını yapılandırır. +/// +public class ChartTooltipDto +{ + public ChartTooltipDto() + { + Border = new ChartBorderDto(); + Font = new ChartFontDto() { Color = "#000000" }; + } + + /// Araç ipucunda görüntülenmeden önce nokta bağımsız değişkenini biçimlendirir. Puan değerini biçimlendirmek için format özelliğini kullanın. + /// /// Accepted Values: 'billions' | 'currency' | 'day' | 'decimal' | 'exponential' | 'fixedPoint' | 'largeNumber' | 'longDate' | 'longTime' | 'millions' | 'millisecond' | 'month' | 'monthAndDay' | 'monthAndYear' | 'percent' | 'quarter' | 'quarterAndYear' | 'shortDate' | 'shortTime' | 'thousands' | 'trillions' | 'year' | 'dayOfWeek' | 'hour' | 'longDateLongTime' | 'minute' | 'second' | 'shortDateShortTime' + /// + public string ArgumentFormat { get; set; } + /// Bir araç ipucunun okunun uzunluğunu piksel cinsinden belirtir. + /// + public int ArrowLength { get; set; } = 10; + /// Bir araç ipucunun kenarlığını yapılandırır. + /// + public ChartBorderDto Border { get; set; } + /// Tüm araç ipuçlarını renklendirir. + /// Bu özellik aşağıdaki renkleri destekler: + /// Hexadecimal colors + /// RGB colors + /// RGBA colors + /// Predefined/cross-browser color names + /// Predefined SVG colors + /// Paint server address + /// + public string Color { get; set; } = "#ffffff"; + /// Araç ipuçlarını etkinleştirir. + /// + public bool Enabled { get; set; } + public ChartFontDto Font { get; set; } + /// Bir değeri araç ipucunda görüntülenmeden önce biçimlendirir. + /// /// Accepted Values: 'billions' | 'currency' | 'day' | 'decimal' | 'exponential' | 'fixedPoint' | 'largeNumber' | 'longDate' | 'longTime' | 'millions' | 'millisecond' | 'month' | 'monthAndDay' | 'monthAndYear' | 'percent' | 'quarter' | 'quarterAndYear' | 'shortDate' | 'shortTime' | 'thousands' | 'trillions' | 'year' | 'dayOfWeek' | 'hour' | 'longDateLongTime' | 'minute' | 'second' | 'shortDateShortTime' + /// + public string Format { get; set; } + /// Araç ipucunun bir seri noktasının merkezinde mi yoksa kenarında mı bulunacağını belirtir. Yalnızca çubuk benzeri ve kabarcık serileri için geçerlidir. + /// Accepted Values: 'center' | 'edge' + /// Bu üye şu seriler tarafından kullanılır: BarSeries, StackedBarSeries, FullStackedBarSeries, BubbleSeries, StockSeries, CandleStickSeries + /// + public string Location { get; set; } = "center"; + /// Araç ipucunun sol/sağ kenarlığı ile metni arasında piksel cinsinden ölçülen boş bir alan oluşturur. + /// + public int PaddingLeftRight { get; set; } = 18; + /// Araç ipucunun üst/alt kenarlığı ile metni arasında piksel cinsinden ölçülen boş bir alan oluşturur. + /// + public int PaddingTopBottom { get; set; } = 15; + /// Araç ipucunun aynı bağımsız değişkenle tüm seri noktalarında paylaşılıp paylaşılmayacağını belirtir. + /// Bu özellik aşağıdaki değerlerden birine sahip olabilir: + /// false: Araç ipucu, yalnızca fare imleciyle üzerine getirilen bir seri noktası hakkındaki bilgileri görüntüler. + /// true : Araç ipucu, üzerine gelinen noktayla aynı bağımsız değişkene sahip tüm seri noktaları hakkında bilgi görüntüler. + /// Bu nokta bir yığına dahilse, araç ipucu yalnızca bu yığındaki noktalar ve herhangi bir yığına (varsa) ait olmayan noktalar hakkında bilgi görüntüler. + /// + public bool Shared { get; set; } + + // customizeTooltip() + + // container + // contentComponent + // contentRender + // contentTemplate // https://js.devexpress.com/Demos/WidgetsGallery/Demo/Charts/TooltipHTMLSupport/jQuery/Light/ + // cornerRadius + // customizeTooltip + // interactive + // opacity + // shadow {} + // zIndex +} + diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartValueAxisDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartValueAxisDto.cs new file mode 100644 index 00000000..0fccf948 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartValueAxisDto.cs @@ -0,0 +1,98 @@ +using System.Collections.Generic; + +namespace Kurs.Platform.ListForms; + +/// Değer eksenini yapılandırır. +/// +public class ChartValueAxisDto +{ + public ChartValueAxisDto() + { + Grid = new ChartAxisGridDto(); + BreakStyle = new BreakStyleDto(); + Breaks = new List(); + Breaks.Add(new BreakDto()); + Breaks.Add(new BreakDto()); + } + + public ChartAxisGridDto Grid { get; set; } + /// Değer ekseninin adını belirtir. + /// + public string Name { get; set; } + /// Bağımsız değişken ekseninin yerini değiştirir. + /// Accepted Values: 'bottom' | 'left' | 'right' | 'top' + /// Default Value: 'left' + /// Döndürülen (Rotated) özelliğin değerine bağlı olarak, konum (Position) farklı değerler kabul eder. + /// If (Rotated = False) => Position = "left" or "right" + /// If (Rotated = True) => Position = "bottom" or "top" + /// + public string Position { get; set; } = "left"; + /// Eksen başlığını yapılandırır. + /// Şimdilik sadece string olaran implemen edildi, ihtiyaç olması durumunda ChartTitleDto benzeri bir nesne ile değiştirilebilir + /// + public string Title { get; set; } + /// Değerleri belirtilen bir veri türüne dönüştürür. + /// Accepted Values: 'datetime' | 'numeric' | 'string' + /// Default Value: undefined + /// Veri kaynağınız sayıları veya tarihleri ​​dizeler olarak saklıyorsa, bu özelliği kullanarak uygun veri türünü belirtin. Tarihlerin geçerli bir biçimi olduğundan emin olun. + /// + public string ValueType { get; set; } = "numeric"; + /// Eksen çizgisini görünür yapar. + /// + public bool Visible { get; set; } = true; + /// Eksen çizgisinin genişliğini piksel cinsinden belirtir. + /// + public int Width { get; set; } = 1; + + public List Breaks { get; set; } + public BreakStyleDto BreakStyle { get; set; } + /// Değer ekseninin türünü belirtir. + /// Accepted Values: 'continuous' | 'discrete' | 'logarithmic' + /// continuous : Sayısal ve tarih-saat değerlerini görüntüler. Bu ekseni aralıklara bölmek için tickInterval özelliğini kullanın. + /// discrete : "Kategoriler" adı verilen dize değerlerini görüntüler. Bunları sıralamak için, kategoriler dizisini kullanın. + /// logarithmic : Sayısal değerleri görüntüler. Her değer, bir kuvvete yükseltilmiş logaritmaTemel değeridir. Örneğin, 10'a eşit olan logaritmaTemel şu değerleri üretir: 10-2, 10-1, 100, 101, 102, vb. Logaritmik eksen, hızla büyüyen değerlerden oluşan bir veri kümesini görselleştirdiğinizde kullanışlıdır. + /// + public string Type { get; set; } + public bool AutoBreaksEnabled { get; set; } = true; + public int MaxAutoBreakCount { get; set; } = 2; + + // ihtiyaç olunca açılacak property ler + + // aggregatedPointsPosition + // allowDecimals + // axisDivisionFactor + // categories + // color + // constantLines[] + // constantLineStyle + // customPosition + // discreteAxisDivisionMode + // endOnTick + // inverted + // label + // linearThreshold + // logarithmBase + // maxValueMargin + // minorGrid + // minorTick + // minorTickCount + // minorTickInterval + // minValueMargin + // minVisualRangeLength + // multipleAxesSpacing + // offset + // opacity + // pane + // placeholderSize + // showZero + // strips[] + // stripStyle + // synchronizedValue + // tick + // tickInterval + // valueMarginsEnabled + // visualRange + // visualRangeUpdateMode + // wholeRange +} + diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartZoomAndPanDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartZoomAndPanDto.cs new file mode 100644 index 00000000..14f92391 --- /dev/null +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/ChartZoomAndPanDto.cs @@ -0,0 +1,37 @@ +namespace Kurs.Platform.ListForms; + +/// Yakınlaştırmayı ve kaydırmayı yapılandırır. +/// Bağımsız değişken ve değer eksenleri için yakınlaştırmayı ve kaydırmayı etkinleştirebilirsiniz. Belirli bir eksen için yakınlaştırmayı, kaydırmayı veya her ikisini birden etkinleştirmek için argumentAxis ve valueAxis özelliklerini ayarlayın. +/// +public class ChartZoomAndPanDto +{ + public ChartZoomAndPanDto() + { + DragBoxStyle = new ChartDragBoxStyle(); + } + + /// Kullanıcıların grafiği yakınlaştırmak için fare tekerleğini kullanıp kullanamayacağını belirtir. Yalnızca bağımsız değişken veya değer ekseni için yakınlaştırmaya izin veriliyorsa geçerlidir. + /// + public bool AllowMouseWheel { get; set; } = true; + /// Kullanıcıların grafiği yakınlaştırmak veya kaydırmak için dokunma hareketlerini kullanıp kullanamayacağını belirtir. Yalnızca bağımsız değişken veya değer ekseni için yakınlaştırma ve kaydırmaya izin veriliyorsa geçerlidir. + /// + public bool AllowTouchGestures { get; set; } = true; + /// Kullanıcıların bağımsız değişken eksenini yakınlaştırmasına ve/veya kaydırmasına izin verilip verilmediğini belirtir. + /// Accepted Values: 'both' | 'none' | 'pan' | 'zoom' + /// + public string ArgumentAxis { get; set; } = "none"; + /// Kullanıcıların, sürükleme hareketiyle bir alan seçerek grafiği yakınlaştırmasına olanak tanır. Yalnızca fare kullanan cihazlarda geçerlidir. + /// + public bool DragToZoom { get; set; } = false; + /// dragToZoom true olduğunda kaydırmayı etkinleştiren anahtarı belirtir. Yalnızca fare kullanan cihazlarda geçerlidir. + /// Accepted Values: 'alt' | 'ctrl' | 'meta' | 'shift' + /// + public string PanKey { get; set; } = "shift"; + /// Kullanıcıların değer eksenini yakınlaştırmasına ve/veya kaydırmasına izin verilip verilmediğini belirtir. + /// Accepted Values: 'both' | 'none' | 'pan' | 'zoom' + /// + public string ValueAxis { get; set; } = "none"; + /// Kullanıcılar sürükleme hareketiyle bir alan seçerek grafiği yakınlaştırdığında görünen kutuyu yapılandırır. Yalnızca dragToZoom doğruysa geçerlidir. + /// + public ChartDragBoxStyle DragBoxStyle { get; set; } +} \ No newline at end of file diff --git a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/EditChartAnnotationsDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/EditChartAnnotationsDto.cs similarity index 70% rename from api/src/Kurs.Platform.Application.Contracts/Charts/Dto/EditChartAnnotationsDto.cs rename to api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/EditChartAnnotationsDto.cs index 0c02e33f..f1c87649 100644 --- a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/EditChartAnnotationsDto.cs +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/EditChartAnnotationsDto.cs @@ -1,8 +1,8 @@ -namespace Kurs.Platform.Charts.Dto; +namespace Kurs.Platform.ListForms; public class EditChartAnnotationsDto { - public string ChartCode { get; set; } + public string ListFormCode { get; set; } public string Id { get; set; } public int Index { get; set; } public string FieldName { get; set; } diff --git a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/EditChartPanesDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/EditChartPanesDto.cs similarity index 69% rename from api/src/Kurs.Platform.Application.Contracts/Charts/Dto/EditChartPanesDto.cs rename to api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/EditChartPanesDto.cs index 54fa5ef8..2c6ab195 100644 --- a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/EditChartPanesDto.cs +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/EditChartPanesDto.cs @@ -1,8 +1,8 @@ -namespace Kurs.Platform.Charts.Dto; +namespace Kurs.Platform.ListForms; public class EditChartPanesDto { - public string ChartCode { get; set; } + public string ListFormCode { get; set; } public string Id { get; set; } public int Index { get; set; } public string FieldName { get; set; } diff --git a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/EditChartSeriesDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/EditChartSeriesDto.cs similarity index 70% rename from api/src/Kurs.Platform.Application.Contracts/Charts/Dto/EditChartSeriesDto.cs rename to api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/EditChartSeriesDto.cs index feb2a4de..57847133 100644 --- a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/EditChartSeriesDto.cs +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/EditChartSeriesDto.cs @@ -1,8 +1,8 @@ -namespace Kurs.Platform.Charts.Dto; +namespace Kurs.Platform.ListForms; public class EditChartSeriesDto { - public string ChartCode { get; set; } + public string ListFormCode { get; set; } public string Id { get; set; } public int Index { get; set; } public string FieldName { get; set; } diff --git a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/EditChartValueAxisDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/EditChartValueAxisDto.cs similarity index 70% rename from api/src/Kurs.Platform.Application.Contracts/Charts/Dto/EditChartValueAxisDto.cs rename to api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/EditChartValueAxisDto.cs index 2baf48e6..6c9426e7 100644 --- a/api/src/Kurs.Platform.Application.Contracts/Charts/Dto/EditChartValueAxisDto.cs +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Chart/EditChartValueAxisDto.cs @@ -1,8 +1,8 @@ -namespace Kurs.Platform.Charts.Dto; +namespace Kurs.Platform.ListForms; public class EditChartValueAxisDto { - public string ChartCode { get; set; } + public string ListFormCode { get; set; } public string Id { get; set; } public int Index { get; set; } public string FieldName { get; set; } diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/GridOptionsDto/GridOptionsDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/GridOptionsDto/GridOptionsDto.cs index 29cc7143..4f1c3ca6 100644 --- a/api/src/Kurs.Platform.Application.Contracts/ListForms/GridOptionsDto/GridOptionsDto.cs +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/GridOptionsDto/GridOptionsDto.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.Text.Json; using System.Text.Json.Serialization; -using Kurs.Platform.Charts.Dto; using Kurs.Platform.Enums; using Volo.Abp.Application.Dtos; diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/ListFormEditTabs.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/ListFormEditTabs.cs index 0b51ea72..d1369095 100644 --- a/api/src/Kurs.Platform.Application.Contracts/ListForms/ListFormEditTabs.cs +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/ListFormEditTabs.cs @@ -51,15 +51,32 @@ public class ListFormEditTabs public const string Fields = "fields"; public const string Customization = "customization"; public const string ExtraFilterForm = "extraFilter"; + // Chart ile ilgili sekmeler - public const string ChartAnimations = "chartAnimations"; - public const string ChartAnnotations = "chartAnnotations"; - public const string ChartCommon = "chartCommon"; - public const string ChartSeries = "chartSeries"; - public const string ChartAxis = "chartAxis"; - public const string ChartPanes = "chartPanes"; - public const string ChartCrosshair = "chartCrosshair"; - public const string ChartExport = "chartExport"; - public const string ChartLegend = "chartLegend"; - public const string ChartZoom = "chartZoom"; + public const string ChartCommonForm = "chartCommon"; + public static class ChartSeries + { + public const string GeneralJsonRow = "chartSeries.general"; + public const string CommonSeriesSettingForm = "chartSeries.commonSetting"; + } + public static class ChartAxis + { + public const string ValueAxisJsonRow = "chartAxis.valueAxis"; + public const string CommonAxisForm = "chartAxis.commonAxis"; + } + public static class ChartPanes + { + public const string CommonPanesSettingForm = "chartPanes.commonSetting"; + public const string PanesJsonRow = "chartPanes.panes"; + } + public const string ChartAnimationForm = "chartAnimation"; + public static class ChartAnnotations + { + public const string GeneralJsonRow = "chartAnnotations.general"; + public const string CommonPaneForm = "chartAnnotations.commonPane"; + } + public const string ChartZoomForm = "chartZoom"; + public const string ChartLegendForm = "chartLegend"; + public const string ChartExportForm = "chartExport"; + public const string ChartCrosshairForm = "chartCrosshair"; } diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/ListFormFields/IListFormFieldsAppService.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/ListFormFields/IListFormFieldsAppService.cs index 80803459..db02ee9c 100644 --- a/api/src/Kurs.Platform.Application.Contracts/ListForms/ListFormFields/IListFormFieldsAppService.cs +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/ListFormFields/IListFormFieldsAppService.cs @@ -9,11 +9,5 @@ public interface IListFormFieldsAppService : ICrudAppService< Guid, ListFormFieldRequestDto> { - //Task DeleteValidationRuleItem(DeleteColumnValidationRuleItemDto model); - //Task CreateNewField(AddListFormFieldDto input); Task CopyField(CopyListFormFieldColumnDto input); - //Task DeleteRemoveField(DeleteListFormFieldRequestDto model); - //Task DeleteConditionFormattingItem(DeleteColumnStyleConditionItemDto model); - //Task> GetFieldNames(string listFormCode, string sourceFieldName); - //Task> GetLanguagesByFieldName(string listFormCode, string fieldName); } diff --git a/api/src/Kurs.Platform.Application.Contracts/ListForms/Select/CrudFieldsDefaultValueJsonItemDto.cs b/api/src/Kurs.Platform.Application.Contracts/ListForms/Select/CrudFieldsDefaultValueJsonItemDto.cs index 5bcca809..c0e43582 100644 --- a/api/src/Kurs.Platform.Application.Contracts/ListForms/Select/CrudFieldsDefaultValueJsonItemDto.cs +++ b/api/src/Kurs.Platform.Application.Contracts/ListForms/Select/CrudFieldsDefaultValueJsonItemDto.cs @@ -12,4 +12,9 @@ public class CrudFieldsDefaultValueJsonItemDto public SubFormDto ItemSubForm { get; set; } public WidgetEditDto ItemWidget { get; set; } public ExtraFilterEditDto ItemExtraFilter { get; set; } + + public ChartSeriesDto ItemChartSeries { get; set; } + public ChartValueAxisDto ItemChartValueAxis { get; set; } + public ChartPanesDto ItemChartPanes { get; set; } + public ChartAnnotationDto ItemChartAnnotation { get; set; } } diff --git a/api/src/Kurs.Platform.Application/Charts/ChartAutoMapperProfile.cs b/api/src/Kurs.Platform.Application/Charts/ChartAutoMapperProfile.cs deleted file mode 100644 index d9a0b454..00000000 --- a/api/src/Kurs.Platform.Application/Charts/ChartAutoMapperProfile.cs +++ /dev/null @@ -1,14 +0,0 @@ -using AutoMapper; -using Kurs.Platform.Charts.Dto; -using Kurs.Platform.Entities; - -namespace Kurs.Platform.Charts; - -public class ChartAutoMapperProfile : Profile -{ - public ChartAutoMapperProfile() - { - CreateMap(); - CreateMap(); - } -} diff --git a/api/src/Kurs.Platform.Application/Charts/ChartSelectAppService.cs b/api/src/Kurs.Platform.Application/Charts/ChartSelectAppService.cs deleted file mode 100644 index 177101f2..00000000 --- a/api/src/Kurs.Platform.Application/Charts/ChartSelectAppService.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Threading.Tasks; -using Kurs.Platform.Charts.Dto; -using Kurs.Platform.Charts.Select; -using Kurs.Platform.DynamicData; -using Microsoft.AspNetCore.Authorization; -using static Kurs.Platform.PlatformConsts; - -namespace Kurs.Platform.Charts; - -[Authorize] -public class ChartSelectAppService : PlatformAppService, IChartSelectAppService -{ - private readonly IChartManager chartManager; - private readonly IDynamicDataManager dynamicDataManager; - - public ChartSelectAppService( - IChartManager chartManager, - IDynamicDataManager dynamicDataManager) - { - this.chartManager = chartManager; - this.dynamicDataManager = dynamicDataManager; - } - - public async Task GetSelectAsync(ChartDataRequestDto request) - { - bool canAccess = await chartManager.CanAccess(request.ChartCode); - if (!canAccess) - { - throw new Volo.Abp.UserFriendlyException(L[AppErrorCodes.NoAuth]); - } - - if (string.IsNullOrEmpty(request.ChartCode)) - { - throw new Volo.Abp.UserFriendlyException(L[AppErrorCodes.ParameterNotValid]); - } - - var entity = await chartManager.GetChart(request.ChartCode); - var (dynamicDataRepository, connectionString, _) = await dynamicDataManager.GetAsync(entity.IsTenant, entity.DataSourceCode); - - var dataS = JsonSerializer.Deserialize(entity.DataSourceJson); - if (dataS != null) - { - var sql = chartManager.GetDefaultValue(dataS.Query); - - if (!request.Filter.IsNullOrWhiteSpace()) - { - var keyValue = JsonSerializer.Deserialize>(request.Filter); - foreach (var item in keyValue) - { - sql = sql.Replace($"@{item.Key}", $"'{item.Value}'"); - } - } - - return await dynamicDataRepository.QueryAsync(sql, connectionString); - } - - throw new Volo.Abp.UserFriendlyException(L[AppErrorCodes.EntityNotFound]); - } -} diff --git a/api/src/Kurs.Platform.Application/Charts/ChartsAppService.cs b/api/src/Kurs.Platform.Application/Charts/ChartsAppService.cs deleted file mode 100644 index b427005f..00000000 --- a/api/src/Kurs.Platform.Application/Charts/ChartsAppService.cs +++ /dev/null @@ -1,262 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Text.Json; -using System.Threading.Tasks; -using Kurs.Platform.Charts.Dto; -using Kurs.Platform.Charts.Select; -using Kurs.Platform.Entities; -using Kurs.Platform.Enums; -using Microsoft.AspNetCore.Authorization; -using Volo.Abp; -using Volo.Abp.Application.Dtos; -using Volo.Abp.Application.Services; -using Volo.Abp.Domain.Repositories; - -namespace Kurs.Platform.Charts; - -[Authorize(PlatformConsts.AppCodes.Listforms.Chart)] -public class ChartsAppService : CrudAppService< - Chart, - ChartDto, - Guid, - PagedAndSortedResultRequestDto, - ChartEditDto>, IChartsAppService -{ - private readonly IChartManager chartManager; - - public ChartsAppService( - IRepository chartRepository, - IChartManager chartManager) : base(chartRepository) - { - this.chartManager = chartManager; - CreatePolicyName = $"{PlatformConsts.AppCodes.Listforms.Chart}.Create"; - UpdatePolicyName = $"{PlatformConsts.AppCodes.Listforms.Chart}.Update"; - DeletePolicyName = $"{PlatformConsts.AppCodes.Listforms.Chart}.Delete"; - } - - public async Task GetByChartCodeAsync(ChartOptionsRequestDto request) - { - bool canAccess = await chartManager.CanAccess(request.ChartCode, AuthorizationTypeEnum.Read); - if (!canAccess) - { - throw new UserFriendlyException(L[PlatformConsts.AppErrorCodes.NoAuth]); - } - - var r = await chartManager.GetChart(request.ChartCode); - var model = ObjectMapper.Map(r); - return model; - } - - public async Task GetChartOptionsAsync(ChartOptionsRequestDto request) - { - bool canAccess = await chartManager.CanAccess(request.ChartCode); - if (!canAccess) - { - throw new UserFriendlyException(L[PlatformConsts.AppErrorCodes.NoAuth]); - } - - var entity = await chartManager.GetChart(request.ChartCode); - return ObjectMapper.Map(entity); - } - - protected override void MapToEntity(ChartEditDto updateInput, Chart entity) - { - entity.CultureName = updateInput.CultureName; - entity.DataSourceCode = updateInput.DataSourceCode; - entity.IsTenant = updateInput.IsTenant; - entity.IsBranch = updateInput.IsBranch; - entity.IsOrganizationUnit = updateInput.IsOrganizationUnit; - - entity.CommonJson = JsonSerializer.Serialize(updateInput.CommonDto); - entity.DataSourceJson = JsonSerializer.Serialize(updateInput.DataSourceDto); - entity.AdaptiveLayoutJson = JsonSerializer.Serialize(updateInput.AdaptivelayoutDto); - entity.AnimationJson = JsonSerializer.Serialize(updateInput.AnimationDto); - entity.ArgumentAxisJson = JsonSerializer.Serialize(updateInput.ArgumentAxisDto); - entity.CommonAxisSettingsJson = JsonSerializer.Serialize(updateInput.CommonAxisSettingsDto); - entity.CommonPaneSettingsJson = JsonSerializer.Serialize(updateInput.CommonPaneSettingsDto); - entity.CommonSeriesSettingsJson = JsonSerializer.Serialize(updateInput.CommonSeriesSettingsDto); - entity.CrosshairJson = JsonSerializer.Serialize(updateInput.CrosshairDto); - entity.ExportJson = JsonSerializer.Serialize(updateInput.ExportDto); - entity.LegendJson = JsonSerializer.Serialize(updateInput.LegendDto); - entity.MarginJson = JsonSerializer.Serialize(updateInput.MarginDto); - entity.ScrollBarJson = JsonSerializer.Serialize(updateInput.ScrollBarDto); - entity.SizeJson = JsonSerializer.Serialize(updateInput.SizeDto); - entity.TitleJson = JsonSerializer.Serialize(updateInput.TitleDto); - entity.TooltipJson = JsonSerializer.Serialize(updateInput.TooltipDto); - //entity.ValueAxisJson = JsonSerializer.Serialize(updateInput.ValueAxisDto); - entity.ZoomAndPanJson = JsonSerializer.Serialize(updateInput.ZoomAndPanDto); - entity.PermissionJson = JsonSerializer.Serialize(updateInput.PermissionDto); - entity.CommonAnnotationsSettingsJson = JsonSerializer.Serialize(updateInput.CommonAnnotationSettingsDto); - } - - public async Task DeleteChartJsonItem(ChartJsonItemRowDto request) - { - //Izin logic process - bool canAccess = await chartManager.CanAccess(request.ChartCode, AuthorizationTypeEnum.Delete); - if (!canAccess) - throw new UserFriendlyException(L[PlatformConsts.AppErrorCodes.NoAuth]); - - var entity = await chartManager.GetChart(request.ChartCode); - var data = ""; - - switch (request.FieldName) - { - case "serie": - data = entity.SeriesJson; - break; - case "axis": - data = entity.ValueAxisJson; - break; - case "pane": - data = entity.PanesJson; - break; - case "annotation": - data = entity.AnnotationsJson; - break; - default: - break; - } - - List listDefaultValues = JsonSerializer.Deserialize>(data); - listDefaultValues.RemoveAt(request.Index); - - string value = JsonSerializer.Serialize(listDefaultValues); - switch (request.FieldName) - { - case "serie": - entity.SeriesJson = value; - break; - case "axis": - entity.ValueAxisJson = value; - break; - case "pane": - entity.PanesJson = value; - break; - case "annotation": - entity.AnnotationsJson = value; - break; - default: - break; - } - - await Repository.UpdateAsync(entity); - - return ObjectMapper.Map(entity); - } - - public async Task UpdateChartJsonItem(ChartJsonItemRowDto request) - { - var entity = await chartManager.GetChart(request.ChartCode); - var data = ""; - - switch (request.FieldName) - { - case "serie": - data = entity.SeriesJson; - - List serieData = null; - if (data != null) - serieData = JsonSerializer.Deserialize>(data); - - if (request.Index == -1) - { - if (serieData == null) - serieData = new List(); - - serieData.Add(request.ItemSerie); - } - else - { - serieData[request.Index] = request.ItemSerie; // ekrandaki veri ile veri tabanında ilgili index degerine sahip veriyi değiştir - } - - entity.SeriesJson = JsonSerializer.Serialize(serieData); - - break; - case "axis": - data = entity.ValueAxisJson; - - List valueAxisData = null; - if (data != null) - valueAxisData = JsonSerializer.Deserialize>(data); - - for (int i = request.ItemAxis.Breaks.Count - 1; i >= 0; i--) - { - if (request.ItemAxis.Breaks[i].StartValue == 0 && request.ItemAxis.Breaks[i].EndValue == 0) - request.ItemAxis.Breaks.RemoveAt(i); - } - - if (request.Index == -1) - { - if (valueAxisData == null) - { - valueAxisData = new List(); - } - - valueAxisData.Add(request.ItemAxis); - } - else - { - valueAxisData[request.Index] = request.ItemAxis; // ekrandaki veri ile veri tabanında ilgili index degerine sahip veriyi değiştir - } - - entity.ValueAxisJson = JsonSerializer.Serialize(valueAxisData); - - break; - case "pane": - data = entity.PanesJson; - - List paneData = null; - if (data != null) - paneData = JsonSerializer.Deserialize>(data); - - if (request.Index == -1) - { - if (paneData == null) - paneData = new List(); - - paneData.Add(request.ItemPane); - } - else - { - paneData[request.Index] = request.ItemPane; // ekrandaki veri ile veri tabanında ilgili index degerine sahip veriyi değiştir - } - - entity.PanesJson = JsonSerializer.Serialize(paneData); - - break; - case "annotation": - data = entity.AnnotationsJson; - - List annotationData = null; - if (data != null) - annotationData = JsonSerializer.Deserialize>(data); - - if (request.Index == -1) - { - if (annotationData == null) - annotationData = new List(); - - annotationData.Add(request.ItemAnnotation); - } - else - { - annotationData[request.Index] = request.ItemAnnotation; // ekrandaki veri ile veri tabanında ilgili index degerine sahip veriyi değiştir - } - - entity.AnnotationsJson = JsonSerializer.Serialize(annotationData); - break; - default: - break; - } - - await Repository.UpdateAsync(entity); - return ObjectMapper.Map(entity); - } - - [RemoteService(isEnabled: false)] - public override Task CreateAsync(ChartEditDto input) - { - return base.CreateAsync(input); - } -} diff --git a/api/src/Kurs.Platform.Application/ListForms/Administration/ListFormJsonRowAppService.cs b/api/src/Kurs.Platform.Application/ListForms/Administration/ListFormJsonRowAppService.cs index 976db3ae..950b16ba 100644 --- a/api/src/Kurs.Platform.Application/ListForms/Administration/ListFormJsonRowAppService.cs +++ b/api/src/Kurs.Platform.Application/ListForms/Administration/ListFormJsonRowAppService.cs @@ -42,6 +42,12 @@ public class ListFormJsonRowAppService : PlatformAppService ListFormEditTabs.SubFormJsonRow => listForm.SubFormsJson.IsNullOrWhiteSpace() ? [] : JsonSerializer.Deserialize>(listForm.SubFormsJson), ListFormEditTabs.WidgetForm => listForm.WidgetsJson.IsNullOrWhiteSpace() ? [] : JsonSerializer.Deserialize>(listForm.WidgetsJson), ListFormEditTabs.ExtraFilterForm => listForm.ExtraFilterJson.IsNullOrWhiteSpace() ? [] : JsonSerializer.Deserialize>(listForm.ExtraFilterJson), + + ListFormEditTabs.ChartSeries.GeneralJsonRow => listForm.SeriesJson.IsNullOrWhiteSpace() ? [] : JsonSerializer.Deserialize>(listForm.SeriesJson), + ListFormEditTabs.ChartAxis.ValueAxisJsonRow => listForm.ValueAxisJson.IsNullOrWhiteSpace() ? [] : JsonSerializer.Deserialize>(listForm.ValueAxisJson), + ListFormEditTabs.ChartPanes.PanesJsonRow => listForm.PanesJson.IsNullOrWhiteSpace() ? [] : JsonSerializer.Deserialize>(listForm.PanesJson), + ListFormEditTabs.ChartAnnotations.GeneralJsonRow => listForm.AnnotationsJson.IsNullOrWhiteSpace() ? [] : JsonSerializer.Deserialize>(listForm.AnnotationsJson), + _ => throw new UserFriendlyException(L[AppErrorCodes.ParameterNotValid]), }; } @@ -81,6 +87,18 @@ public class ListFormJsonRowAppService : PlatformAppService case ListFormEditTabs.ExtraFilterForm: listForm.ExtraFilterJson = CreateRow(listForm.ExtraFilterJson, ObjectMapper.Map(model.ItemExtraFilter)); break; + case ListFormEditTabs.ChartSeries.GeneralJsonRow: + listForm.SeriesJson = CreateRow(listForm.SeriesJson, ObjectMapper.Map(model.ItemChartSeries)); + break; + case ListFormEditTabs.ChartAxis.ValueAxisJsonRow: + listForm.ValueAxisJson = CreateRow(listForm.ValueAxisJson, ObjectMapper.Map(model.ItemChartValueAxis)); + break; + case ListFormEditTabs.ChartPanes.PanesJsonRow: + listForm.PanesJson = CreateRow(listForm.PanesJson, ObjectMapper.Map(model.ItemChartPanes)); + break; + case ListFormEditTabs.ChartAnnotations.GeneralJsonRow: + listForm.AnnotationsJson = CreateRow(listForm.AnnotationsJson, ObjectMapper.Map(model.ItemChartAnnotation)); + break; default: throw new UserFriendlyException(L[AppErrorCodes.ParameterNotValid]); } @@ -123,6 +141,18 @@ public class ListFormJsonRowAppService : PlatformAppService case ListFormEditTabs.ExtraFilterForm: listForm.ExtraFilterJson = UpdateRow(listForm.ExtraFilterJson, ObjectMapper.Map(model.ItemExtraFilter), model.Index); break; + case ListFormEditTabs.ChartSeries.GeneralJsonRow: + listForm.SeriesJson = UpdateRow(listForm.SeriesJson, ObjectMapper.Map(model.ItemChartSeries), model.Index); + break; + case ListFormEditTabs.ChartAxis.ValueAxisJsonRow: + listForm.ValueAxisJson = UpdateRow(listForm.ValueAxisJson, ObjectMapper.Map(model.ItemChartValueAxis), model.Index); + break; + case ListFormEditTabs.ChartPanes.PanesJsonRow: + listForm.PanesJson = UpdateRow(listForm.PanesJson, ObjectMapper.Map(model.ItemChartPanes), model.Index); + break; + case ListFormEditTabs.ChartAnnotations.GeneralJsonRow: + listForm.AnnotationsJson = UpdateRow(listForm.AnnotationsJson, ObjectMapper.Map(model.ItemChartAnnotation), model.Index); + break; default: throw new UserFriendlyException(L[AppErrorCodes.ParameterNotValid]); } @@ -165,6 +195,18 @@ public class ListFormJsonRowAppService : PlatformAppService case ListFormEditTabs.ExtraFilterForm: listForm.ExtraFilterJson = DeleteRow(listForm.ExtraFilterJson, index); break; + case ListFormEditTabs.ChartSeries.GeneralJsonRow: + listForm.SeriesJson = DeleteRow(listForm.SeriesJson, index); + break; + case ListFormEditTabs.ChartAxis.ValueAxisJsonRow: + listForm.ValueAxisJson = DeleteRow(listForm.ValueAxisJson, index); + break; + case ListFormEditTabs.ChartPanes.PanesJsonRow: + listForm.PanesJson = DeleteRow(listForm.PanesJson, index); + break; + case ListFormEditTabs.ChartAnnotations.GeneralJsonRow: + listForm.AnnotationsJson = DeleteRow(listForm.AnnotationsJson, index); + break; default: throw new UserFriendlyException(L[AppErrorCodes.ParameterNotValid]); } diff --git a/api/src/Kurs.Platform.Application/ListForms/Administration/ListFormsAppService.cs b/api/src/Kurs.Platform.Application/ListForms/Administration/ListFormsAppService.cs index 66806783..6fb2ee8e 100644 --- a/api/src/Kurs.Platform.Application/ListForms/Administration/ListFormsAppService.cs +++ b/api/src/Kurs.Platform.Application/ListForms/Administration/ListFormsAppService.cs @@ -152,44 +152,50 @@ public class ListFormsAppService : CrudAppService< } /*Chart*/ - else if (input.EditType == ListFormEditTabs.ChartCommon) + else if (input.EditType == ListFormEditTabs.ChartCommonForm) { item.CommonJson = JsonSerializer.Serialize(input.CommonDto); + item.AdaptiveLayoutJson = JsonSerializer.Serialize(input.AdaptivelayoutDto); + item.TitleJson = JsonSerializer.Serialize(input.TitleDto); + item.TooltipJson = JsonSerializer.Serialize(input.TooltipDto); + item.MarginJson = JsonSerializer.Serialize(input.MarginDto); + item.SizeJson = JsonSerializer.Serialize(input.SizeDto); + item.ScrollBarJson = JsonSerializer.Serialize(input.ScrollBarDto); } - else if (input.EditType == ListFormEditTabs.ChartSeries) + else if (input.EditType == ListFormEditTabs.ChartSeries.CommonSeriesSettingForm) { - item.SeriesJson = JsonSerializer.Serialize(input.SeriesDto); + item.CommonSeriesSettingsJson = JsonSerializer.Serialize(input.CommonSeriesSettingsDto); } - else if (input.EditType == ListFormEditTabs.ChartAxis) + else if (input.EditType == ListFormEditTabs.ChartAxis.CommonAxisForm) { - item.CommonAxisSettingsJson = JsonSerializer.Serialize(input.CommonAxisSettingsDto); item.ArgumentAxisJson = JsonSerializer.Serialize(input.ArgumentAxisDto); + item.CommonAxisSettingsJson = JsonSerializer.Serialize(input.CommonAxisSettingsDto); } - else if (input.EditType == ListFormEditTabs.ChartPanes) + else if (input.EditType == ListFormEditTabs.ChartPanes.CommonPanesSettingForm) { - item.PanesJson = JsonSerializer.Serialize(input.PanesDto); + item.CommonPaneSettingsJson = JsonSerializer.Serialize(input.CommonPaneSettingsDto); } - else if (input.EditType == ListFormEditTabs.ChartAnimations) + else if (input.EditType == ListFormEditTabs.ChartAnimationForm) { item.AnimationJson = JsonSerializer.Serialize(input.AnimationDto); } - else if (input.EditType == ListFormEditTabs.ChartAnnotations) + else if (input.EditType == ListFormEditTabs.ChartAnnotations.CommonPaneForm) { - item.AnnotationsJson = JsonSerializer.Serialize(input.AnnotationsDto); + item.CommonAnnotationsSettingsJson = JsonSerializer.Serialize(input.CommonAnnotationSettingsDto); } - else if (input.EditType == ListFormEditTabs.ChartZoom) + else if (input.EditType == ListFormEditTabs.ChartZoomForm) { item.ZoomAndPanJson = JsonSerializer.Serialize(input.ZoomAndPanDto); } - else if (input.EditType == ListFormEditTabs.ChartLegend) + else if (input.EditType == ListFormEditTabs.ChartLegendForm) { item.LegendJson = JsonSerializer.Serialize(input.LegendDto); } - else if (input.EditType == ListFormEditTabs.ChartExport) + else if (input.EditType == ListFormEditTabs.ChartExportForm) { item.ExportJson = JsonSerializer.Serialize(input.ExportDto); } - else if (input.EditType == ListFormEditTabs.ChartCrosshair) + else if (input.EditType == ListFormEditTabs.ChartCrosshairForm) { item.CrosshairJson = JsonSerializer.Serialize(input.CrosshairDto); } diff --git a/api/src/Kurs.Platform.Application/ListForms/ListFormAutoMapperProfile.cs b/api/src/Kurs.Platform.Application/ListForms/ListFormAutoMapperProfile.cs index e7ff1348..e40f53bf 100644 --- a/api/src/Kurs.Platform.Application/ListForms/ListFormAutoMapperProfile.cs +++ b/api/src/Kurs.Platform.Application/ListForms/ListFormAutoMapperProfile.cs @@ -28,6 +28,18 @@ public class ListFormAutoMapperProfile : Profile CreateMap() .ForMember(dest => dest.Items, opt => opt.MapFrom(src => src.Items)); CreateMap().ReverseMap(); + CreateMap(); + + CreateMap(); + CreateMap(); + CreateMap(); + CreateMap(); + + CreateMap(); + + CreateMap(); + CreateMap(); + CreateMap(); CreateMap(); CreateMap(); diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs index 8139ee36..e4b452eb 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/ListFormsSeeder.cs @@ -74,7 +74,7 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency new { TabTitle = "Form Sütun Sayıları", TabType = ListFormTabTypeEnum.Chart, - Code = ChartCodes.Chart2, + Code = ListFormCodes.Charts.Chart2, Relation = new List() { new { ParentFieldName = "ListFormCode", @@ -5949,324 +5949,6 @@ public class ListFormsSeeder : IDataSeedContributor, ITransientDependency } #endregion - #region Chart - if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.Chart)) - { - var listFormCharts = await _listFormRepository.InsertAsync( - new ListForm() - { - CultureName = LanguageCodes.En, - ListFormCode = ListFormCodes.Lists.Chart, - Name = AppCodes.Listforms.Chart, - Title = AppCodes.Listforms.Chart, - DataSourceCode = SeedConsts.DataSources.DefaultCode, - IsTenant = false, - IsBranch = false, - IsOrganizationUnit = false, - Description = AppCodes.Listforms.Chart, - SelectCommandType = SelectCommandTypeEnum.Table, - SelectCommand = SelectCommandByTableName("Chart"), - KeyFieldName = "Id", - KeyFieldDbSourceType = DbType.Guid, - DefaultFilter = "\"IsDeleted\" = 'false'", - SortMode = GridOptions.SortModeSingle, - FilterRowJson = JsonSerializer.Serialize(new GridFilterRowDto - { - Visible = true - }), - HeaderFilterJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SearchPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - GroupPanelJson = JsonSerializer.Serialize(new - { - Visible = true - }), - SelectionJson = JsonSerializer.Serialize(new SelectionDto - { - Mode = GridOptions.SelectionModeSingle, - AllowSelectAll = false - }), - ColumnOptionJson = JsonSerializer.Serialize(new - { - ColumnFixingEnabled = true, - ColumnChooserEnabled = true - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = AppCodes.Listforms.Chart + ".Create", - R = AppCodes.Listforms.Chart, - U = AppCodes.Listforms.Chart + ".Update", - D = AppCodes.Listforms.Chart + ".Delete", - E = AppCodes.Listforms.Chart + ".Export", - I = AppCodes.Listforms.Chart + ".Import" - }), - DeleteCommand = $"UPDATE \"{DbTablePrefix}Chart\" SET \"DeleterId\"=@DeleterId, \"DeletionTime\"=CURRENT_TIMESTAMP, \"IsDeleted\"='true' WHERE \"Id\"=@Id", - DeleteFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { - new() { - FieldName = "DeleterId", - FieldDbType = DbType.Guid, - Value = "@USERID", - CustomValueType = FieldCustomValueTypeEnum.CustomKey }, - new() { - FieldName = "Id", - FieldDbType = DbType.Guid, - Value = "@ID", - CustomValueType = FieldCustomValueTypeEnum.CustomKey } - }), - PagerOptionJson = JsonSerializer.Serialize(new GridPagerOptionDto - { - Visible = true, - AllowedPageSizes = "10,20,50,100", - ShowPageSizeSelector = true, - ShowNavigationButtons = true, - ShowInfo = false, - InfoText = "Page {0} of {1} ({2} items)", - DisplayMode = GridColumnOptions.PagerDisplayModeAdaptive, - ScrollingMode = GridColumnOptions.ScrollingModeStandard, - LoadPanelEnabled = "auto", - LoadPanelText = "Loading..." - }), - EditingOptionJson = JsonSerializer.Serialize(new GridEditingDto - { - Popup = new GridEditingPopupDto() - { - Title = "Chart Form", - Width = 600, - Height = 300 - }, - AllowDeleting = true, - AllowAdding = true, - AllowUpdating = true, - SendOnlyChangedFormValuesUpdate = false, - }), - EditingFormJson = JsonSerializer.Serialize(new List() { - new EditingFormDto() { Order=1,ColCount=1,ColSpan=2,ItemType="group", Items= - [ - new EditingFormItemDto { Order = 1, DataField = "ChartCode", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxTextBox }, - new EditingFormItemDto { Order = 2, DataField = "CultureName", ColSpan = 2, IsRequired = true, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton }, - new EditingFormItemDto { Order = 3, DataField = "UserId", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton }, - new EditingFormItemDto { Order = 4, DataField = "RoleId", ColSpan = 2, IsRequired = false, EditorType2=EditorTypes.dxSelectBox, EditorOptions=showClearButton }, - - ] - } - }), - InsertFieldsDefaultValueJson = JsonSerializer.Serialize(new FieldsDefaultValue[] { - new() { - FieldName = "CreationTime", - FieldDbType = DbType.DateTime, - Value = "@NOW", - CustomValueType = FieldCustomValueTypeEnum.CustomKey }, - new() { - FieldName = "CreatorId", - FieldDbType = DbType.Guid, - Value = "@USERID", - CustomValueType = FieldCustomValueTypeEnum.CustomKey }, - new() { - FieldName = "IsDeleted", - FieldDbType = DbType.Boolean, - Value = "false", - CustomValueType = FieldCustomValueTypeEnum.Value } - }), - CommandColumnJson = JsonSerializer.Serialize(new CommandColumnDto[] { - new() { - Hint = "Manage Chart", - Text ="Manage", - UrlTarget="_blank", - AuthName=AppCodes.Listforms.Chart + ".Update", - Url="/admin/chart/edit/@ChartCode" - }, - new() { - Hint = "Göster", - Text ="Göster", - UrlTarget="_blank", - AuthName=AppCodes.Listforms.Chart, - Url="/admin/chart/@ChartCode" - } - }), - } - ); - - #region Chart Fields - await _listFormFieldRepository.InsertManyAsync(new ListFormField[] { - new ListFormField - { - ListFormCode = listFormCharts.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.Guid, - FieldName = "Id", - Width = 50, - ListOrderNo = 0, - Visible = false, - IsActive = true, - IsDeleted = false, - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Chart + ".Create", - R = AppCodes.Listforms.Chart, - U = AppCodes.Listforms.Chart + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormCharts.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "ChartCode", - Width = 250, - ListOrderNo = 1, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Chart + ".Create", - R = AppCodes.Listforms.Chart, - U = AppCodes.Listforms.Chart + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormCharts.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "CultureName", - Width = 200, - ListOrderNo = 2, - Visible = true, - IsActive = true, - IsDeleted = false, - SortIndex = 1, - SortDirection = GridColumnOptions.SortOrderAsc, - AllowSearch = true, - ValidationRuleJson = JsonSerializer.Serialize(new ValidationRuleDto[] { - new ValidationRuleDto() { Type = Enum.GetName(UiColumnValidationRuleTypeEnum.required)} - }), - LookupJson = JsonSerializer.Serialize(new LookupDto - { - - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = lookupQueryCultureValues - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Chart + ".Create", - R = AppCodes.Listforms.Chart, - U = AppCodes.Listforms.Chart + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormCharts.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "UserId", - Width = 200, - ListOrderNo = 3, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto { - - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = $"SELECT \"UserName\" AS \"Key\", \"UserName\" AS \"Name\" FROM \"AbpUsers\"", - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Chart + ".Create", - R = AppCodes.Listforms.Chart, - U = AppCodes.Listforms.Chart + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - }, - new ListFormField - { - ListFormCode = listFormCharts.ListFormCode, - RoleId = null, - UserId = null, - CultureName = LanguageCodes.En, - SourceDbType = DbType.String, - FieldName = "RoleId", - Width = 200, - ListOrderNo = 4, - Visible = true, - IsActive = true, - IsDeleted = false, - AllowSearch = true, - LookupJson = JsonSerializer.Serialize(new LookupDto { - - DataSourceType = UiLookupDataSourceTypeEnum.Query, - DisplayExpr = "Name", - ValueExpr = "Key", - LookupQuery = $"SELECT \"Name\" AS \"Key\", \"Name\" AS \"Name\" FROM \"AbpRoles\"", - }), - PermissionJson = JsonSerializer.Serialize(new ListFormFieldPermissionDto - { - C = AppCodes.Listforms.Chart + ".Create", - R = AppCodes.Listforms.Chart, - U = AppCodes.Listforms.Chart + ".Update", - E = true, - I = true, - Deny = false - }), - PivotSettingsJson = JsonSerializer.Serialize(new ListFormFieldPivotSettingsDto - { - IsPivot = true - }) - } - }); - #endregion - } - #endregion - #region Data Source if (!await _listFormRepository.AnyAsync(a => a.ListFormCode == ListFormCodes.Lists.DataSource)) { diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformDataSeeder.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformDataSeeder.cs index bef6beff..bfab4118 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformDataSeeder.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/PlatformDataSeeder.cs @@ -6,11 +6,9 @@ using System.Text.Json; using System.Threading.Tasks; using Kurs.Languages.Entities; using Kurs.Notifications.Entities; -using Kurs.Platform.Charts.Dto; using Kurs.Platform.Entities; using Kurs.Platform.Enums; using Kurs.Platform.Forum; -using Kurs.Platform.ListForms; using Kurs.Platform.Seeds; using Kurs.Settings.Entities; using Microsoft.Extensions.Configuration; @@ -34,7 +32,6 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency private readonly IRepository _languagesText; private readonly IRepository _dataSources; private readonly IRepository _settings; - private readonly IRepository _charts; private readonly IRepository _globalSearch; private readonly IRepository _backgroundWorkerRepository; private readonly IRepository _notificationRuleRepository; @@ -76,7 +73,6 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency IRepository languagesText, IRepository dataSource, IRepository settings, - IRepository charts, IRepository globalSearch, IRepository backgroundWorkerRepository, IRepository notificationRuleRepository, @@ -118,7 +114,6 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency _languagesText = languagesText; _dataSources = dataSource; _settings = settings; - _charts = charts; _globalSearch = globalSearch; _backgroundWorkerRepository = backgroundWorkerRepository; _notificationRuleRepository = notificationRuleRepository; @@ -409,7 +404,6 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency var languages = await _languages.GetListAsync(); var keys = await _languageKey.GetListAsync(); var texts = await _languagesText.GetListAsync(); - var charts = await _charts.GetListAsync(); var configuration = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) @@ -420,54 +414,6 @@ public class PlatformDataSeeder : IDataSeedContributor, ITransientDependency var options = new JsonSerializerOptions { PropertyNameCaseInsensitive = true }; - foreach (var item in items.Charts) - { - if (!charts.Any(a => a.ChartCode == item.ChartCode)) - { - await _charts.InsertAsync(new() - { - ChartCode = item.ChartCode, - CultureName = item.CultureName, - DataSourceCode = item.DataSourceCode, - UserId = item.UserId, - RoleId = item.RoleId, - TitleJson = JsonSerializer.Serialize(new ChartTitleDto - { - Text = item.Title.Text, - Subtitle = item.Title.Subtitle, - }), - DataSourceJson = JsonSerializer.Serialize(new ChartDataSourceDto - { - Query = item.DataSource.Query - }), - SeriesJson = JsonSerializer.Serialize(item.Series), - CrosshairJson = JsonSerializer.Serialize(new ChartCrosshairDto() - { - Enabled = item.Crosshair.Enabled, - Color = item.Crosshair.Color, - DashStyle = item.Crosshair.DashStyle, - HorizontalLine = new ChartCrosshairLineDto() { DashStyle = item.Crosshair.HorizontalLine.DashStyle } - }), - ArgumentAxisJson = JsonSerializer.Serialize(new ChartArgumentAxisDto() - { - Label = item.ArgumentAxis.Label - }), - SizeJson = JsonSerializer.Serialize(new ChartSizeDto - { - Width = item.Size.Width, - Height = item.Size.Height - }), - PermissionJson = JsonSerializer.Serialize(new PermissionCrudDto - { - C = item.Permission.C, - R = item.Permission.R, - U = item.Permission.U, - D = item.Permission.D - }), - }); - } - } - foreach (var item in items.Settings) { if (!settings.Any(a => a.Code == item.Code)) diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json index 5489ea1f..d01b5210 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederData.json @@ -623,54 +623,6 @@ "IsEnabled": true, "MultiTenancySide": 2 }, - { - "GroupName": "App.Saas", - "Name": "App.Listforms.Chart", - "ParentName": null, - "DisplayName": "App.Listforms.Chart", - "IsEnabled": true, - "MultiTenancySide": 2 - }, - { - "GroupName": "App.Saas", - "Name": "App.Listforms.Chart.Create", - "ParentName": "App.Listforms.Chart", - "DisplayName": "Create", - "IsEnabled": true, - "MultiTenancySide": 2 - }, - { - "GroupName": "App.Saas", - "Name": "App.Listforms.Chart.Delete", - "ParentName": "App.Listforms.Chart", - "DisplayName": "Delete", - "IsEnabled": true, - "MultiTenancySide": 2 - }, - { - "GroupName": "App.Saas", - "Name": "App.Listforms.Chart.Export", - "ParentName": "App.Listforms.Chart", - "DisplayName": "Export", - "IsEnabled": true, - "MultiTenancySide": 2 - }, - { - "GroupName": "App.Saas", - "Name": "App.Listforms.Chart.Import", - "ParentName": "App.Listforms.Chart", - "DisplayName": "Import", - "IsEnabled": true, - "MultiTenancySide": 2 - }, - { - "GroupName": "App.Saas", - "Name": "App.Listforms.Chart.Update", - "ParentName": "App.Listforms.Chart", - "DisplayName": "Update", - "IsEnabled": true, - "MultiTenancySide": 2 - }, { "GroupName": "App.Saas", "Name": "App.Notifications.NotificationRules", @@ -6053,16 +6005,6 @@ "RequiredPermissionName": "App.Listforms.Listform", "IsDisabled": false }, - { - "ParentCode": "App.Listforms", - "Code": "App.Listforms.Chart", - "DisplayName": "App.Listforms.Chart", - "Order": 4, - "Url": "/admin/list/list-chart", - "Icon": "FcTodoList", - "RequiredPermissionName": "App.Listforms.Chart", - "IsDisabled": false - }, { "ParentCode": "App.Saas", "Code": "App.Notifications", @@ -7476,13 +7418,6 @@ "routeType": "protected", "authority": [] }, - { - "key": "admin.chartManagement.edit", - "path": "/admin/chart/edit/:chartCode", - "componentPath": "@/views/admin/chart/ChartEdit", - "routeType": "protected", - "authority": [] - }, { "key": "admin.forumManagement", "path": "/admin/forumManagement", @@ -7590,7 +7525,7 @@ }, { "key": "admin.chart", - "path": "/admin/chart/:chartCode", + "path": "/admin/chart/:listFormCode", "componentPath": "@/views/chart/Chart", "routeType": "protected", "authority": [] @@ -12456,6 +12391,66 @@ "en": "Customization", "tr": "Özelleştirme" }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.TabChartCommon", + "en": "Chart Common", + "tr": "Grafik Ortak" + }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.TabChartSeries", + "en": "Series", + "tr": "Seriler" + }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.TabChartAxis", + "en": "Axis", + "tr": "Eksen" + }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.TabChartPanes", + "en": "Panes", + "tr": "Paneller" + }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.TabChartAnimation", + "en": "Animation", + "tr": "Animasyon" + }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.TabChartAnnotations", + "en": "Annotations", + "tr": "Açıklamalar" + }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.TabChartZoomAndPan", + "en": "Zoom & Pan", + "tr": "Zoom & Pan" + }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.TabChartLegend", + "en": "Legend", + "tr": "Gösterge" + }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.TabChartExport", + "en": "Export", + "tr": "Dışa Aktar" + }, + { + "resourceName": "Platform", + "key": "ListForms.ListFormEdit.TabChartCrosshair", + "en": "Crosshair", + "tr": "Crosshair" + }, { "resourceName": "Platform", "key": "ListForms.ListFormEdit.DetailsCultureName", @@ -20348,53 +20343,6 @@ "order": 66 } ], - "Charts": [ - { - "chartCode": "Chart-0002", - "cultureName": "en", - "dataSourceCode": "Default", - "userId": "", - "roleId": "", - "title": { - "text": "Form Sütun Sayıları", - "subtitle": "Hangi formda kaç adet sütun var" - }, - "dataSource": { - "query": "SELECT \"ListFormCode\", COUNT(*) AS \"SutunSayisi\" FROM \"PListFormField\" GROUP BY \"ListFormCode\"" - }, - "series": [ - { - "argumentField": "ListFormCode", - "valueField": "SutunSayisi", - "type": "bar", - "name": "Sütun Sayıları" - } - ], - "crosshair": { - "enabled": true, - "color": "#949494", - "dashStyle": "solid", - "horizontalLine": { - "dashStyle": "dot" - } - }, - "size": { - "width": 500, - "height": 250 - }, - "argumentAxis": { - "label": { - "displayMode": "rotate" - } - }, - "permission": { - "c": "App.Listforms.Chart.Create", - "r": "App.Listforms.Chart", - "u": "App.Listforms.Chart.Update", - "d": "App.Listforms.Chart.Delete" - } - } - ], "GlobalSearch": [ { "system": "Platform", diff --git a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDto.cs b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDto.cs index 77835f31..95553cb8 100644 --- a/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDto.cs +++ b/api/src/Kurs.Platform.DbMigrator/Seeds/SeederDto.cs @@ -1,10 +1,8 @@ using System; using System.Collections.Generic; using Kurs.Languages.Entities; -using Kurs.Platform.Charts.Dto; using Kurs.Platform.Contacts; using Kurs.Platform.Entities; -using Kurs.Platform.ListForms; using Kurs.Settings.Entities; using static Kurs.Platform.Abouts.AboutDto; @@ -16,7 +14,6 @@ public class SeederDto public List LanguageTexts { get; set; } public List DataSources { get; set; } public List Settings { get; set; } - public List Charts { get; set; } public List GlobalSearch { get; set; } public List BackgroundWorkers { get; set; } public List NotificationRules { get; set; } @@ -49,22 +46,6 @@ public class SeederDto public List Classrooms { get; set; } } -public class ChartsSeedDto -{ - public string ChartCode { get; set; } - public string CultureName { get; set; } - public string DataSourceCode { get; set; } - public string UserId { get; set; } - public string RoleId { get; set; } - public ChartTitleDto Title { get; set; } - public ChartDataSourceDto DataSource { get; set; } - public List Series { get; set; } - public ChartCrosshairDto Crosshair { get; set; } - public ChartSizeDto Size { get; set; } - public PermissionCrudDto Permission { get; set; } - public ChartArgumentAxisDto ArgumentAxis { get; set; } -} - public class LanguageTextsSeedDto { public string ResourceName { get; set; } diff --git a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs index fb822e21..f27418e9 100644 --- a/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs +++ b/api/src/Kurs.Platform.Domain.Shared/PlatformConsts.cs @@ -386,6 +386,12 @@ public static class PlatformConsts public const string FormSkillType = "form-skilltype"; } + public static class Charts + { + public const string Chart1 = "Chart-0001"; + public const string Chart2 = "Chart-0002"; + } + } public static class Wizard @@ -409,12 +415,6 @@ public static class PlatformConsts } - public static class ChartCodes - { - public const string Chart1 = "Chart-0001"; - public const string Chart2 = "Chart-0002"; - } - public static class AppErrorCodes { public const string NoAuth = "Error:0001"; diff --git a/api/src/Kurs.Platform.Domain/Charts/ChartManager.cs b/api/src/Kurs.Platform.Domain/Charts/ChartManager.cs deleted file mode 100644 index a80b4166..00000000 --- a/api/src/Kurs.Platform.Domain/Charts/ChartManager.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Linq; -using System.Text.Json; -using System.Threading.Tasks; -using Kurs.Platform.DynamicData; -using Kurs.Platform.Entities; -using Kurs.Platform.Enums; -using Kurs.Platform.Permissions; -using Microsoft.AspNetCore.Authorization; -using Volo.Abp.Domain.Entities; -using Volo.Abp.Domain.Repositories; -using Volo.Abp.Domain.Services; -using Volo.Abp.Users; - -namespace Kurs.Platform.Charts; - -public interface IChartManager -{ - Task CanAccess(string chartCode, AuthorizationTypeEnum authType = AuthorizationTypeEnum.Read); - Task GetChart(string chartCode); - string GetDefaultValue(string strValue); -} - -public class ChartManager : DomainService, IChartManager -{ - private readonly IRepository repository; - private readonly IAuthorizationService authorizationService; - private readonly ICurrentUser currentUser; - - private readonly string cultureName; - private readonly string cultureNameDefault; - - public ChartManager( - IRepository _chartRepository, - IAuthorizationService _authorizationService, - ICurrentUser _currentUser) - { - this.repository = _chartRepository; - this.authorizationService = _authorizationService; - this.currentUser = _currentUser; - - this.cultureName = CultureInfo.CurrentUICulture.Name; - this.cultureNameDefault = PlatformConsts.DefaultLanguage; - } - - public async Task CanAccess( - string chartCode, - AuthorizationTypeEnum authType = AuthorizationTypeEnum.Read) - { - var chart = await repository.FirstOrDefaultAsync(a => a.ChartCode == chartCode); - if (chart == null) - return false; - - if (chart.PermissionJson.IsNullOrWhiteSpace()) - return false; - - var permissions = JsonSerializer.Deserialize(chart.PermissionJson); - var result = authType switch - { - AuthorizationTypeEnum.Read => await authorizationService.AuthorizeAsync(permissions.R), - AuthorizationTypeEnum.Update => await authorizationService.AuthorizeAsync(permissions.U), - AuthorizationTypeEnum.Create => await authorizationService.AuthorizeAsync(permissions.C), - AuthorizationTypeEnum.Delete => await authorizationService.AuthorizeAsync(permissions.D), - _ => await authorizationService.AuthorizeAsync(permissions.R), - }; - - return result.Succeeded; - } - - public async Task GetChart(string chartCode) - { - var listForms = await repository.GetListAsync(a => - a.ChartCode == chartCode && - (a.CultureName == cultureName || a.CultureName == cultureNameDefault)); - - if (listForms.IsNullOrEmpty()) - throw new EntityNotFoundException(); - - // Kullaniciya ait bir Chart dil kaydi var ise onu al yoksa varsayilan dile ait olan kaydi al - var listForm = listForms.FirstOrDefault(a => a.CultureName == cultureName) ?? listForms.FirstOrDefault(a => a.CultureName == cultureNameDefault); - - return listForm; - } - - public string GetDefaultValue(string strValue) - { - return strValue?.Replace(PlatformConsts.DefaultValues.UserId, currentUser.Id.ToString()) - .Replace(PlatformConsts.DefaultValues.UserName, currentUser.UserName) - .Replace(PlatformConsts.DefaultValues.Roles, currentUser.Roles.JoinAsString("','")) - .Replace(PlatformConsts.DefaultValues.Now, DateTime.UtcNow.ToString("o", CultureInfo.InvariantCulture)) - .Replace(PlatformConsts.DefaultValues.TenantId, CurrentTenant.Id.HasValue ? CurrentTenant.Id.ToString() : null); - } -} - diff --git a/api/src/Kurs.Platform.Domain/Entities/Chart.cs b/api/src/Kurs.Platform.Domain/Entities/Chart.cs deleted file mode 100644 index c72ab5b5..00000000 --- a/api/src/Kurs.Platform.Domain/Entities/Chart.cs +++ /dev/null @@ -1,130 +0,0 @@ -using System; -using Volo.Abp.Domain.Entities.Auditing; - -namespace Kurs.Platform.Entities; - -/// Verileri görselleştirmek için kullanılan entity -/// -/// -public class Chart : FullAuditedEntity -{ - /// Tekil Chart kodu - /// - public string ChartCode { get; set; } - public string DataSourceCode { get; set; } // Veri kaynagi - - /// Chart a yetkili kullanıcı. UserId ve RoleId boş ise herkes yetkilidir - /// - public string UserId { get; set; } - /// Chart a yetkili rol. UserId ve RoleId boş ise herkes yetkilidir - /// - public string RoleId { get; set; } - public string CultureName { get; set; } - - /// DxChart'ın istediği ve aşağıdaki diğer propertyler içerisinde olmayan diğer bütün ayarların tutulduğu Json veri yapısı - /// - public string CommonJson { get; set; } - /// Chart'a ait sorguların tutulduğu Json veri yapısı - /// - public string DataSourceJson { get; set; } - - /// Uyarlanabilir düzen özelliklerini tutan Json veri yapısıdır. - /// Uyarlanabilir düzen, UI bileşeninin, kapsayıcıya sığmayan isteğe bağlı öğeleri gizlemesini sağlar. - /// - public string AdaptiveLayoutJson { get; set; } - /// Animasyon özelliklerini belirtir. - /// UI bileşeni, öğeler ilk yüklenirken ve veri kaynağı değiştiğinde canlandırır - /// - public string AnimationJson { get; set; } - /// Ek açıklama koleksiyonuna ait Json veri yapısı. - /// Ek açıklamalar, görselleştirilmiş veriler hakkında ek bilgiler görüntüleyen resimler, metin blokları ve özel içerik için içeriklerdir - /// - public string AnnotationsJson { get; set; } - /// Bağımsız değişken eksenini yapılandırır. - /// Burada açıklanan argumentAxis nesnesi, bağımsız değişken eksenini ayrı ayrı yapılandırır. - /// Bir grafikteki tüm eksenler için ortak ayarlar belirtmek üzere commonAxisSettings nesnesini kullanılmalıdır. - /// Eksene özgü ayarlar, ortak ayarları geçersiz kılar. - /// - public string ArgumentAxisJson { get; set; } - - /// Grafikteki tüm detaylandırmalar için ortak olan ayarları belirtir. - /// Burada belirtilen ayarlar, AnnotationsJson dizisinde belirtilen bireysel ek açıklama ayarlar var ise göz ardı edilebilir. - /// Ek açıklamaların nasıl yapılandırılacağı hakkında bilgi için AnnotationsJson açıklamasına bakın. - /// - public string CommonAnnotationsSettingsJson { get; set; } - /// Bir grafikte hem bağımsız değişken hem de değer ekseni için ortak ayarları tanımlar. - /// Burada belirtilen ayarlar, ArgumentAxisJson yada ValueAxisJson ayarları dolu ise göz ardı edilir - /// - public string CommonAxisSettingsJson { get; set; } - /// Bir grafikteki tüm bölmeler için ortak ayarları tanımlar. - /// Bölme, dizi içeren bir grafik alanıdır. Bir grafikte çok sayıda seri varsa, bunlar birden çok bölme arasında dağıtılabilir. - /// - public string CommonPaneSettingsJson { get; set; } - /// Grafikteki tüm seriler için ortak olan ayarları belirtir. - /// - public string CommonSeriesSettingsJson { get; set; } - - /// fare ile grafik üzerindeki bir noktaya gelindiğinde yatay ve dikey çizgilerin çıkmasını sağlayan Json veri yapısıdır - /// - public string CrosshairJson { get; set; } - /// Dışa aktarma ve yazdırma özelliklerini yapılandırır - /// - public string ExportJson { get; set; } - /// Bir grafiğin açıklamasının (lejant) özelliklerini belirtir. - /// Grafik Kullanıcı Arabirimi bileşeni, bir diziyi tanımlamanıza yardımcı olan açıklayıcı bir bileşen olan bir açıklama içerebilir. - /// Her seri, bir Legend bir öğe ile temsil edilir. Bir öğe işaretçisi, seri rengini tanımlar. - /// - public string LegendJson { get; set; } - /// UI bileşeni çevresinde boşluk ayarlarını yapılandırır - /// - public string MarginJson { get; set; } - /// Bölme alanlarını bildirir. Bölme, dizi içeren bir grafik alanıdır. - /// Bir grafikte çok sayıda seri varsa, bunlar birden çok bölme arasında dağıtılabilir. - /// - public string PanesJson { get; set; } - /// Kaydırma çubuğunun ayarlarını belirtir. - /// - public string ScrollBarJson { get; set; } - /// Chart UI bileşen serisi için özellikleri belirtir. - /// Cannot be used in themes - /// - public string SeriesJson { get; set; } - /// Char boyutunu belirtir - /// - public string SizeJson { get; set; } - /// Başlık ayarlarını içeren Json veri yapısı - /// - public string TitleJson { get; set; } - /// Tooltip ayarlarını içeren Json veri yapısıdır. - /// Tooltip, bir seri noktasının değerlerini gösteren minyatür bir dikdörtgendir. - /// Kullanıcı imleci bir dizi noktasının üzerine getirdiğinde bir araç ipucu görünür. - /// - public string TooltipJson { get; set; } - /// Değer eksenini yapılandırır. - /// Burada açıklanan valueAxis nesnesi, değer eksenini ayrı ayrı yapılandırır. - /// Bir grafikteki tüm eksenler için ortak ayarlar belirtmek üzere commonAxisSettings nesnesini kullanılmalıdır. Eksene özgü ayarlar, ortak ayarları geçersiz kılar. - /// - public string ValueAxisJson { get; set; } - /// Yakınlaştırmayı ve kaydırmayı yapılandırır. - /// Bağımsız değişken ve değer eksenleri için yakınlaştırmayı ve kaydırmayı etkinleştirebilirsiniz. - /// Belirli bir eksen için yakınlaştırmayı, kaydırmayı veya her ikisini birden etkinleştirmek için argumentAxis ve valueAxis özellikleri ayarlanmalıdır - /// - public string ZoomAndPanJson { get; set; } - /// Chart'ın sahip oldugu yetki tanimlari, dogrudan APB yetkilerine gonderilir - /// - public string PermissionJson { get; set; } - - /// - /// liste formların tenantlı çalışıp çalışmadığını ifade eder. - /// - public bool IsTenant { get; set; } = PlatformConsts.IsMultiTenant; - - /// - /// Liste formların şubeli'lu çalışıp çalışmadığını ifade eder. - /// - public bool IsBranch { get; set; } = false; - /// - /// Liste formların ou'lu çalışıp çalışmadığını ifade eder. - /// - public bool IsOrganizationUnit { get; set; } = false; -} diff --git a/api/src/Kurs.Platform.Domain/Queries/Break.cs b/api/src/Kurs.Platform.Domain/Queries/Break.cs new file mode 100644 index 00000000..8144124d --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Queries/Break.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; +using Volo.Abp.Domain.Values; + +namespace Kurs.Platform.Queries; + +public class Break : ValueObject +{ + public int EndValue { get; set; } + public int StartValue { get; set; } + + protected override IEnumerable GetAtomicValues() + { + yield return EndValue; + yield return StartValue; + } +} diff --git a/api/src/Kurs.Platform.Domain/Queries/BreakStyle.cs b/api/src/Kurs.Platform.Domain/Queries/BreakStyle.cs new file mode 100644 index 00000000..bcddc75c --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Queries/BreakStyle.cs @@ -0,0 +1,18 @@ +using System.Collections.Generic; +using Volo.Abp.Domain.Values; + +namespace Kurs.Platform.Queries; + +public class BreakStyle : ValueObject +{ + public string Color { get; private set; } = "#ababab"; + public string Line { get; private set; } = "waved"; + public int Width { get; private set; } = 5; + + protected override IEnumerable GetAtomicValues() + { + yield return Color; + yield return Line; + yield return Width; + } +} diff --git a/api/src/Kurs.Platform.Domain/Queries/ChartAnnotation.cs b/api/src/Kurs.Platform.Domain/Queries/ChartAnnotation.cs new file mode 100644 index 00000000..f62ffede --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Queries/ChartAnnotation.cs @@ -0,0 +1,55 @@ +using System.Collections.Generic; +using Volo.Abp.Domain.Values; + +namespace Kurs.Platform.Queries; + +public class ChartAnnotation : ValueObject +{ + public string Argument { get; private set; } + public ChartBorder Border { get; private set; } + public string Color { get; private set; } = "#ffffff"; + public string Description { get; private set; } + public ChartFont Font { get; private set; } + public int Height { get; private set; } = -1; + public string Image { get; private set; } + public string Name { get; private set; } + public int OffsetX { get; private set; } = -1; + public int OffsetY { get; private set; } = -1; + public int PaddingLeftRight { get; private set; } = 10; + public int PaddingTopBottom { get; private set; } = 10; + public string Series { get; private set; } + public string Text { get; private set; } + public bool TooltipEnabled { get; private set; } = true; + public string Type { get; private set; } + public string Value { get; private set; } + public int Width { get; private set; } + public string WordWrap { get; private set; } = "normal"; + public int X { get; private set; } + public int Y { get; private set; } + + protected override IEnumerable GetAtomicValues() + { + yield return Argument; + yield return Border; + yield return Color; + yield return Description; + yield return Font; + yield return Height; + yield return Image; + yield return Name; + yield return OffsetX; + yield return OffsetY; + yield return PaddingLeftRight; + yield return PaddingTopBottom; + yield return Series; + yield return Text; + yield return TooltipEnabled; + yield return Type; + yield return Value; + yield return Width; + yield return WordWrap; + yield return X; + yield return Y; + } +} + diff --git a/api/src/Kurs.Platform.Domain/Queries/ChartAxisGrid.cs b/api/src/Kurs.Platform.Domain/Queries/ChartAxisGrid.cs new file mode 100644 index 00000000..b58b3091 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Queries/ChartAxisGrid.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using Volo.Abp.Domain.Values; + +namespace Kurs.Platform.Queries; + +public class ChartAxisGrid : ValueObject +{ + public string Color { get; private set; } = "#d3d3d3"; + public bool Visible { get; private set; } + public int Width { get; private set; } = 1; + + private ChartAxisGrid() { } // EF Core için gerekli + + public ChartAxisGrid(string color, bool visible, int width) + { + Color = string.IsNullOrWhiteSpace(color) ? "#d3d3d3" : color; + Visible = visible; + Width = width > 0 ? width : 1; + } + + protected override IEnumerable GetAtomicValues() + { + yield return Color; + yield return Visible; + yield return Width; + } +} diff --git a/api/src/Kurs.Platform.Domain/Queries/ChartBorder.cs b/api/src/Kurs.Platform.Domain/Queries/ChartBorder.cs new file mode 100644 index 00000000..b199c998 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Queries/ChartBorder.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; +using Volo.Abp.Domain.Values; + +namespace Kurs.Platform.Queries; + +public class ChartBorder : ValueObject +{ + public string Color { get; private set; } = "#d3d3d3"; + public int CornerRadius { get; private set; } = 0; + public string DashStyle { get; private set; } = "solid"; + public bool Visible { get; private set; } + public int Width { get; private set; } = 1; + + protected override IEnumerable GetAtomicValues() + { + yield return Color; + yield return CornerRadius; + yield return DashStyle; + yield return Visible; + yield return Width; + } +} diff --git a/api/src/Kurs.Platform.Domain/Queries/ChartFont.cs b/api/src/Kurs.Platform.Domain/Queries/ChartFont.cs new file mode 100644 index 00000000..c26d7b42 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Queries/ChartFont.cs @@ -0,0 +1,20 @@ +using System.Collections.Generic; +using Volo.Abp.Domain.Values; + +namespace Kurs.Platform.Queries; + +public class ChartFont : ValueObject +{ + public string Color { get; private set; } = "#FFFFFF"; + public string Family { get; private set; } = "\"Segoe UI\", \"Helvetica Neue\", \"Trebuchet MS\", Verdana, sans-serif"; + public int Size { get; private set; } = 12; + public int Weight { get; private set; } = 400; + + protected override IEnumerable GetAtomicValues() + { + yield return Color; + yield return Family; + yield return Size; + yield return Weight; + } +} diff --git a/api/src/Kurs.Platform.Domain/Queries/ChartLabel.cs b/api/src/Kurs.Platform.Domain/Queries/ChartLabel.cs new file mode 100644 index 00000000..978f0879 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Queries/ChartLabel.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; +using Volo.Abp.Domain.Values; + +namespace Kurs.Platform.Queries; + +public class ChartLabel : ValueObject +{ + public string BackgroundColor { get; private set; } = "#f05b41"; + public string CustomizeText { get; private set; } + public ChartFont Font { get; private set; } + public bool Visible { get; private set; } + public string Format { get; private set; } + + protected override IEnumerable GetAtomicValues() + { + yield return BackgroundColor; + yield return CustomizeText; + yield return Font; + yield return Visible; + yield return Format; + } +} diff --git a/api/src/Kurs.Platform.Domain/Queries/ChartPanes.cs b/api/src/Kurs.Platform.Domain/Queries/ChartPanes.cs new file mode 100644 index 00000000..caba8f15 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Queries/ChartPanes.cs @@ -0,0 +1,27 @@ +using System.Collections.Generic; +using Volo.Abp.Domain.Values; + +namespace Kurs.Platform.Queries; + +public class ChartPanes : ValueObject +{ + public string BackgroundColor { get; private set; } + public int Height { get; private set; } = 250; + public string Name { get; private set; } + + private ChartPanes() { } // EF Core / JSON için + + public ChartPanes(string name, int height, string backgroundColor) + { + Name = name; + Height = height > 0 ? height : 250; + BackgroundColor = backgroundColor ?? string.Empty; + } + + protected override IEnumerable GetAtomicValues() + { + yield return Name; + yield return Height; + yield return BackgroundColor; + } +} diff --git a/api/src/Kurs.Platform.Domain/Queries/ChartSeries.cs b/api/src/Kurs.Platform.Domain/Queries/ChartSeries.cs new file mode 100644 index 00000000..f1cfd69b --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Queries/ChartSeries.cs @@ -0,0 +1,54 @@ +using System.Collections.Generic; +using Volo.Abp.Domain.Values; + +namespace Kurs.Platform.Queries; + +public class ChartSeries : ValueObject +{ + public string ArgumentField { get; private set; } = "arg"; + public string Axis { get; private set; } + public string BarOverlapGroup { get; private set; } + public int BarPadding { get; private set; } + public int BarWidth { get; private set; } + public string Color { get; private set; } + public int CornerRadius { get; private set; } = 0; + public string DashStyle { get; private set; } = "solid"; + public bool IgnoreEmptyPoints { get; private set; } = false; + public string Name { get; private set; } + public string Pane { get; private set; } + public string RangeValue1Field { get; private set; } = "val1"; + public string RangeValue2Field { get; private set; } = "val2"; + public string SelectionMode { get; private set; } = "none"; + public bool ShowInLegend { get; private set; } = true; + public string Type { get; private set; } + public string ValueField { get; private set; } + public bool Visible { get; private set; } = true; + public int Width { get; private set; } = 2; + + public ChartLabel Label { get; private set; } + + protected override IEnumerable GetAtomicValues() + { + yield return ArgumentField; + yield return Axis; + yield return BarOverlapGroup; + yield return BarPadding; + yield return BarWidth; + yield return Color; + yield return CornerRadius; + yield return DashStyle; + yield return IgnoreEmptyPoints; + yield return Name; + yield return Pane; + yield return RangeValue1Field; + yield return RangeValue2Field; + yield return SelectionMode; + yield return ShowInLegend; + yield return Type; + yield return ValueField; + yield return Visible; + yield return Width; + yield return Label; + } +} + diff --git a/api/src/Kurs.Platform.Domain/Queries/ChartValueAxis.cs b/api/src/Kurs.Platform.Domain/Queries/ChartValueAxis.cs new file mode 100644 index 00000000..ab377462 --- /dev/null +++ b/api/src/Kurs.Platform.Domain/Queries/ChartValueAxis.cs @@ -0,0 +1,67 @@ +using System.Collections.Generic; +using System.Linq; +using Volo.Abp.Domain.Values; + +namespace Kurs.Platform.Queries; + +public class ChartValueAxis : ValueObject +{ + public ChartAxisGrid Grid { get; private set; } + public string Name { get; private set; } + public string Position { get; private set; } = "left"; + public string Title { get; private set; } + public string ValueType { get; private set; } = "numeric"; + public bool Visible { get; private set; } = true; + public int Width { get; private set; } = 1; + public IReadOnlyCollection Breaks { get; private set; } + public BreakStyle BreakStyle { get; private set; } + public string Type { get; private set; } + public bool AutoBreaksEnabled { get; private set; } = true; + public int MaxAutoBreakCount { get; private set; } = 2; + + public ChartValueAxis( + ChartAxisGrid grid, + string name, + string position, + string title, + string valueType, + bool visible, + int width, + IEnumerable breaks, + BreakStyle breakStyle, + string type, + bool autoBreaksEnabled, + int maxAutoBreakCount) + { + Grid = grid; + Name = name; + Position = position ?? "left"; + Title = title; + ValueType = valueType ?? "numeric"; + Visible = visible; + Width = width > 0 ? width : 1; + Breaks = breaks?.ToList() ?? []; + BreakStyle = breakStyle; + Type = type; + AutoBreaksEnabled = autoBreaksEnabled; + MaxAutoBreakCount = maxAutoBreakCount; + } + + + protected override IEnumerable GetAtomicValues() + { + yield return Grid; + yield return Name; + yield return Position; + yield return Title; + yield return ValueType; + yield return Visible; + yield return Width; + foreach (var br in Breaks) + yield return br; + yield return BreakStyle; + yield return Type; + yield return AutoBreaksEnabled; + yield return MaxAutoBreakCount; + } +} diff --git a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs index 6cadb824..9c24ba90 100644 --- a/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs +++ b/api/src/Kurs.Platform.EntityFrameworkCore/EntityFrameworkCore/PlatformDbContext.cs @@ -42,7 +42,6 @@ public class PlatformDbContext : public DbSet ListFormCustomization { get; set; } public DbSet Menus { get; set; } public DbSet IpRestrictions { get; set; } - public DbSet Charts { get; set; } public DbSet DataSources { get; set; } public DbSet BackgroundWorkers { get; set; } public DbSet CustomEndpoints { get; set; } @@ -231,15 +230,6 @@ public class PlatformDbContext : b.Property(a => a.IP).HasMaxLength(32).IsRequired(); }); - builder.Entity(b => - { - b.ToTable(PlatformConsts.DbTablePrefix + nameof(Chart), PlatformConsts.DbSchema); - b.ConfigureByConvention(); //auto configure for the base class props - - b.Property(a => a.ChartCode).HasMaxLength(100).IsRequired(); - b.Property(a => a.CultureName).HasDefaultValue("en").IsRequired(); - }); - builder.Entity(b => { b.ToTable(PlatformConsts.DbTablePrefix + nameof(DataSource), PlatformConsts.DbSchema); diff --git a/ui/src/proxy/charts/models.ts b/ui/src/proxy/admin/charts/models.ts similarity index 73% rename from ui/src/proxy/charts/models.ts rename to ui/src/proxy/admin/charts/models.ts index 72cdcc2e..0efeaa22 100644 --- a/ui/src/proxy/charts/models.ts +++ b/ui/src/proxy/admin/charts/models.ts @@ -1,5 +1,5 @@ import { AuditedEntityDto } from '@/proxy/abp' -import { PermissionCrudDto } from '../form/models' +import { PermissionCrudDto } from '@/proxy/form/models' export interface BreakDto { endValue: number @@ -167,7 +167,7 @@ export interface ChartCrosshairLineDto { } export interface ChartDataRequestDto { - chartCode: string + listFormCode: string } export interface ChartDataSourceDto { @@ -179,66 +179,66 @@ export interface ChartDragBoxStyle { opacity: number } -export interface ChartDto extends AuditedEntityDto { - chartCode?: string - userId?: string - roleId?: string - cultureName?: string - commonJson?: string - commonDto: ChartCommonDto - adaptiveLayoutJson?: string - adaptivelayoutDto: ChartAdaptivelayoutDto - animationJson?: string - animationDto: ChartAnimationDto - annotationsJson?: string - annotationsDto: ChartAnnotationDto[] - argumentAxisJson?: string - argumentAxisDto: ChartArgumentAxisDto - commonAnnotationsSettingsJson?: string - commonAnnotationSettingsDto: ChartCommonAnnotationDto - commonAxisSettingsJson?: string - commonAxisSettingsDto: ChartCommonAxisDto - commonPaneSettingsJson?: string - commonPaneSettingsDto: ChartCommonPaneDto - commonSeriesSettingsJson?: string - commonSeriesSettingsDto: ChartCommonSeriesSettingsDto - crosshairJson?: string - crosshairDto: ChartCrosshairDto - exportJson?: string - exportDto: ChartExportDto - legendJson?: string - legendDto: ChartLegendDto - marginJson?: string - marginDto: ChartMarginDto - panesJson?: string - panesDto: ChartPanesDto[] - scrollBarJson?: string - scrollBarDto: ChartScrollBarDto - seriesJson?: string - seriesDto: ChartSeriesDto[] - sizeJson?: string - sizeDto: ChartSizeDto - titleJson?: string - titleDto: ChartTitleDto - tooltipJson?: string - tooltipDto: ChartTooltipDto - valueAxisJson?: string - valueAxisDto: ChartValueAxisDto[] - zoomAndPanJson?: string - zoomAndPanDto: ChartZoomAndPanDto - permissionJson?: string - permissionDto: PermissionCrudDto - isTenant: boolean - isBranch: boolean - isOrganizationUnit: boolean -} +// export interface ChartDto extends AuditedEntityDto { +// listFormCode?: string +// userId?: string +// roleId?: string +// cultureName?: string +// commonJson?: string +// commonDto: ChartCommonDto +// adaptiveLayoutJson?: string +// adaptivelayoutDto: ChartAdaptivelayoutDto +// animationJson?: string +// animationDto: ChartAnimationDto +// annotationsJson?: string +// annotationsDto: ChartAnnotationDto[] +// argumentAxisJson?: string +// argumentAxisDto: ChartArgumentAxisDto +// commonAnnotationsSettingsJson?: string +// commonAnnotationSettingsDto: ChartCommonAnnotationDto +// commonAxisSettingsJson?: string +// commonAxisSettingsDto: ChartCommonAxisDto +// commonPaneSettingsJson?: string +// commonPaneSettingsDto: ChartCommonPaneDto +// commonSeriesSettingsJson?: string +// commonSeriesSettingsDto: ChartCommonSeriesSettingsDto +// crosshairJson?: string +// crosshairDto: ChartCrosshairDto +// exportJson?: string +// exportDto: ChartExportDto +// legendJson?: string +// legendDto: ChartLegendDto +// marginJson?: string +// marginDto: ChartMarginDto +// panesJson?: string +// panesDto: ChartPanesDto[] +// scrollBarJson?: string +// scrollBarDto: ChartScrollBarDto +// seriesJson?: string +// seriesDto: ChartSeriesDto[] +// sizeJson?: string +// sizeDto: ChartSizeDto +// titleJson?: string +// titleDto: ChartTitleDto +// tooltipJson?: string +// tooltipDto: ChartTooltipDto +// valueAxisJson?: string +// valueAxisDto: ChartValueAxisDto[] +// zoomAndPanJson?: string +// zoomAndPanDto: ChartZoomAndPanDto +// permissionJson?: string +// permissionDto: PermissionCrudDto +// isTenant: boolean +// isBranch: boolean +// isOrganizationUnit: boolean +// } -export interface ChartEditDto extends ChartDto { - editType: string - dataSourceJson?: string - dataSourceDto: ChartDataSourceDto - dataSourceCode?: string -} +// export interface ChartEditDto extends ChartDto { +// editType: string +// dataSourceJson?: string +// dataSourceDto: ChartDataSourceDto +// dataSourceCode?: string +// } export interface ChartExportDto { backgroundColor?: string @@ -281,7 +281,7 @@ export interface ChartMarginDto { } export interface ChartOptionsRequestDto { - chartCode?: string + listFormCode?: string } export interface ChartPanesDto { @@ -374,14 +374,3 @@ export interface ChartZoomAndPanDto { valueAxis?: string dragBoxStyle: ChartDragBoxStyle } - -export interface ChartJsonItemRowDto { - chartCode?: string - id?: string - index: number - fieldName: string - itemAnnotation?: ChartAnnotationDto - itemPane?: ChartPanesDto - itemSerie?: ChartSeriesDto - itemAxis?: ChartValueAxisDto -} diff --git a/ui/src/proxy/admin/list-form/models.ts b/ui/src/proxy/admin/list-form/models.ts index 085f1b06..26aeaac5 100644 --- a/ui/src/proxy/admin/list-form/models.ts +++ b/ui/src/proxy/admin/list-form/models.ts @@ -7,6 +7,12 @@ import { SubFormDto, WidgetEditDto, } from '../../form/models' +import { + ChartAnnotationDto, + ChartPanesDto, + ChartSeriesDto, + ChartValueAxisDto, +} from '../charts/models' export interface ListFormWizardDto { listFormCode: string @@ -39,6 +45,11 @@ export interface ListFormJsonRowDto { itemSubForm?: SubFormDto itemWidget?: WidgetEditDto itemExtraFilter?: ExtraFilterEditDto + + itemChartAnnotation?: ChartAnnotationDto + itemChartPane?: ChartPanesDto + itemChartSerie?: ChartSeriesDto + itemChartValueAxis?: ChartValueAxisDto } export const ListFormEditTabs = { @@ -84,15 +95,27 @@ export const ListFormEditTabs = { ExtraFilter: 'extraFilter', //Chart Tabs ChartCommon: 'chartCommon', - ChartSeries: 'chartSeries', - ChartAxis: 'chartAxis', - ChartPanes: 'chartPanes', - ChartAnimations: 'chartAnimations', - ChartAnnotations: 'chartAnnotations', - ChartZoom: 'chartZoom', - ChartLegend: 'chartLegend', - ChartExport: 'chartExport', - ChartCrosshair: 'chartCrosshair', + ChartSeries: { + GeneralJsonRow: 'chartSeries.general', + CommonSeriesSettingForm: 'chartSeries.commonSetting', + }, + ChartAxis: { + ValueAxisJsonRow: 'chartAxis.valueAxis', + CommonAxisForm: 'chartAxis.commonAxis', + }, + ChartPanes: { + CommonPanesSettingForm: 'chartPanes.commonSetting', + PanesJsonRow: 'chartPanes.panes', + }, + ChartAnimationForm: 'chartAnimation', + ChartAnnotations: { + GeneralJsonRow: 'chartAnnotations.general', + CommonPaneForm: 'chartAnnotations.commonPane', + }, + ChartZoomForm: 'chartZoom', + ChartLegendForm: 'chartLegend', + ChartExportForm: 'chartExport', + ChartCrosshairForm: 'chartCrosshair', } as const export const extraFilterControlTypeOptions = [ diff --git a/ui/src/proxy/form/models.ts b/ui/src/proxy/form/models.ts index 517714f7..d31b5e47 100644 --- a/ui/src/proxy/form/models.ts +++ b/ui/src/proxy/form/models.ts @@ -42,7 +42,7 @@ import { ChartTooltipDto, ChartValueAxisDto, ChartZoomAndPanDto, -} from '../charts/models' +} from '../admin/charts/models' //1 export interface SelectListItem { diff --git a/ui/src/routes/route.constant.ts b/ui/src/routes/route.constant.ts index 1c3cd7db..bc312e4a 100644 --- a/ui/src/routes/route.constant.ts +++ b/ui/src/routes/route.constant.ts @@ -30,9 +30,6 @@ export const ROUTES_ENUM = { wizard: '/admin/listform/wizard', edit: '/admin/listform/edit/:listFormCode', }, - chartManagement: { - edit: '/admin/chart/edit/:chartCode', - }, forumManagement: '/admin/forumManagement', developerKit: { dashboard: '/admin/developerkit', @@ -74,7 +71,7 @@ export const ROUTES_ENUM = { formNew: '/admin/form/:listFormCode', formView: '/admin/form/:listFormCode/:id', formEdit: '/admin/form/:listFormCode/:id/edit', - chart: '/admin/chart/:chartCode', + chart: '/admin/chart/:listFormCode', pivot: '/admin/pivot/:listFormCode', classroom: { dashboard: '/admin/classroom/dashboard', diff --git a/ui/src/services/chart.service.ts b/ui/src/services/chart.service.ts index 15f3b095..3d62b874 100644 --- a/ui/src/services/chart.service.ts +++ b/ui/src/services/chart.service.ts @@ -1,48 +1,20 @@ -import { ChartDto, ChartEditDto, ChartJsonItemRowDto } from '../proxy/charts/models' -import apiService from './api.service' +// import { ChartJsonItemRowDto } from '../proxy/admin/charts/models' +// import apiService from './api.service' -export const getChartByCode = (chartCode: string) => - apiService.fetchData({ - method: 'GET', - url: `/api/app/charts/by-chart-code`, - params: { chartCode }, - }) +// export const deleteChartJsonItem = ( +// id: string, +// listFormCode: string, +// index: number, +// fieldName: string, +// ) => +// apiService.fetchData({ +// method: 'DELETE', +// url: `/api/app/charts/chart-json-item?id=${id}&listFormCode=${listFormCode}&index=${index}&fieldName=${fieldName}`, +// }) -export const getChartOptions = (chartCode: string) => - apiService.fetchData({ - method: 'GET', - url: `/api/app/charts/chart-options`, - params: { chartCode }, - }) - -export const getChartSelect = (chartCode: string, filter?: string) => - apiService.fetchData({ - method: 'GET', - url: `/api/app/chart-select/select`, - params: { chartCode, filter }, - }) - -export const putCharts = (input: ChartEditDto) => - apiService.fetchData({ - method: 'PUT', - url: `/api/app/charts/${input.id}`, - data: input, - }) - -export const deleteChartJsonItem = ( - id: string, - chartCode: string, - index: number, - fieldName: string, -) => - apiService.fetchData({ - method: 'DELETE', - url: `/api/app/charts/chart-json-item?id=${id}&chartCode=${chartCode}&index=${index}&fieldName=${fieldName}`, - }) - -export const putChartJsonItem = (input: ChartJsonItemRowDto) => - apiService.fetchData({ - method: 'PUT', - url: `/api/app/charts/chart-json-item`, - data: input, - }) +// export const putChartJsonItem = (input: ChartJsonItemRowDto) => +// apiService.fetchData({ +// method: 'PUT', +// url: `/api/app/charts/chart-json-item`, +// data: input, +// }) diff --git a/ui/src/views/admin/listForm/edit/ChartTabAnimation.tsx b/ui/src/views/admin/listForm/edit/ChartTabAnimation.tsx index c5d09a8c..fb6515e0 100644 --- a/ui/src/views/admin/listForm/edit/ChartTabAnimation.tsx +++ b/ui/src/views/admin/listForm/edit/ChartTabAnimation.tsx @@ -23,7 +23,7 @@ function ChartTabAnimation(props: FormEditProps) { initialValues={listFormValues} validationSchema={schema} onSubmit={async (values, formikHelpers) => { - await props.onSubmit(ListFormEditTabs.ChartAnimations, values, formikHelpers) + await props.onSubmit(ListFormEditTabs.ChartAnimationForm, values, formikHelpers) }} > {({ touched, errors, resetForm, isSubmitting, values }) => ( diff --git a/ui/src/views/admin/listForm/edit/ChartTabAnnotations.tsx b/ui/src/views/admin/listForm/edit/ChartTabAnnotations.tsx index cf9dba04..1c2dade8 100644 --- a/ui/src/views/admin/listForm/edit/ChartTabAnnotations.tsx +++ b/ui/src/views/admin/listForm/edit/ChartTabAnnotations.tsx @@ -30,15 +30,17 @@ import { chartWordWrapListOptions, chartSeriesDashStyleOptions, } from './options' -import { ChartSeriesDto } from '@/proxy/charts/models' +import { ChartSeriesDto } from '@/proxy/admin/charts/models' +import { JsonRowDialogData } from './json-row-operations/types' +import { useState } from 'react' const schema = object().shape({ name: string().required(), }) -function ChartTabAnnotations( - props: FormEditProps & { setDatabaseOperationsModalData: Function; setConfirmDelete: Function }, -) { +function ChartTabAnnotations(props: FormEditProps) { + const [isJsonRowOpDialogOpen, setIsJsonRowOpDialogOpen] = useState(false) + const [jsonRowOpModalData, setJsonRowOpModalData] = useState() const { translate } = useLocalization() const listFormValues = useStoreState((s) => s.admin.listFormValues) @@ -58,7 +60,11 @@ function ChartTabAnnotations( initialValues={listFormValues} validationSchema={schema} onSubmit={async (values, formikHelpers) => { - await props.onSubmit(ListFormEditTabs.ChartAnnotations, values, formikHelpers) + await props.onSubmit( + ListFormEditTabs.ChartAnnotations.CommonPaneForm, + values, + formikHelpers, + ) }} > {({ touched, errors, resetForm, isSubmitting, values }) => ( @@ -84,12 +90,13 @@ function ChartTabAnnotations( icon={} onClick={async (e) => { e.preventDefault() - props.setDatabaseOperationsModalData({ + setJsonRowOpModalData({ + tabName: ListFormEditTabs.ChartAnnotations.GeneralJsonRow, + operation: 'create', id: values.id ?? '', index: -1, - isOpen: 'annotation', - operation: 'insert', }) + setIsJsonRowOpDialogOpen(true) }} /> @@ -114,14 +121,14 @@ function ChartTabAnnotations( title="Edit" icon={} onClick={async (e) => { - e.preventDefault() - props.setDatabaseOperationsModalData({ + setJsonRowOpModalData({ + tabName: ListFormEditTabs.ChartAnnotations.GeneralJsonRow, + operation: 'update', id: values.id ?? '', index, - isOpen: 'annotation', - operation: 'update', - annotationsValues: listFormValues.annotationsDto[index], + chartAnnotationValues: values.annotationsDto[index], }) + setIsJsonRowOpDialogOpen(true) }} /> - - - - )} - - - - setDatabaseOperationsModalData(defaultDatabaseOperation)} - onRequestClose={() => setDatabaseOperationsModalData(defaultDatabaseOperation)} - > -
{databaseOperationsModalData.index === -1 ? 'Add' : 'Update'}
- - { - setSubmitting(true) - await putChartJsonItem({ - chartCode: listFormValues.listFormCode, - id: listFormValues.id, - index: databaseOperationsModalData.index, - fieldName: 'serie', - itemSerie: { ...values } as ChartSeriesDto, - }) - - toast.push( - - {databaseOperationsModalData.index === -1 - ? 'Kayıt eklendi.' - : 'Kayıt Değiştirildi.'} - , - { - placement: 'top-end', - }, - ) - - getListFormValues() - setSubmitting(false) - setDatabaseOperationsModalData(defaultDatabaseOperation) - }} - > - {({ touched, errors, resetForm, isSubmitting, values }) => ( -
- -
- - - - - - - - - - - - - - - {({ field, form }: FieldProps) => ( - option.value === values.axis)} - onChange={(option) => form.setFieldValue(field.name, option?.value)} - /> - )} - - - - - - {({ field, form }: FieldProps) => ( - option.value === values.dashStyle, - )} - onChange={(option) => form.setFieldValue(field.name, option?.value)} - /> - )} - - - - - - - - - - {({ field, form }: FieldProps) => ( - option.value === values.label.format, - )} - onChange={(option) => form.setFieldValue(field.name, option?.value)} - /> - )} - - - - - - - -
-
- -
-
-
- )} -
-
- - setDatabaseOperationsModalData(defaultDatabaseOperation)} - onRequestClose={() => setDatabaseOperationsModalData(defaultDatabaseOperation)} - > -
{databaseOperationsModalData.index === -1 ? 'Add' : 'Update'}
- - { - setSubmitting(true) - await putChartJsonItem({ - chartCode: listFormValues.listFormCode, - id: listFormValues.id, - index: databaseOperationsModalData.index, - fieldName: 'axis', - itemAxis: { ...values }, - }) - toast.push( - - {databaseOperationsModalData.index === -1 - ? 'Kayıt eklendi.' - : 'Kayıt Değiştirildi.'} - , - { - placement: 'top-end', - }, - ) - - getListFormValues() - setSubmitting(false) - setDatabaseOperationsModalData(defaultDatabaseOperation) - }} - > - {({ touched, errors, resetForm, isSubmitting, values }) => { - const breaks = values.breaks - - return ( -
- -
- - - - - - - {({ field, form }: FieldProps) => ( - option.value === values.type, - )} - onChange={(option) => form.setFieldValue(field.name, option?.value)} - /> - )} - - - - - - {({ field, form }: FieldProps) => ( - option.value === values.breakStyle.line, - )} - onChange={(option) => - form.setFieldValue(field.name, option?.value) - } - /> - )} - - - - - - {({ form, remove, push }) => ( -
- {breaks && breaks.length > 0 - ? breaks.map((_, index) => { - const startValueFeedBack = fieldFeedback( - form, - `breaks[${index}].startValue`, - ) - const endValueFeedBack = fieldFeedback( - form, - `breaks[${index}].endValue`, - ) - - return ( -
- - - - - - - - -
- ) - }) - : null} -
- -
-
- )} -
-
-
- - -
- -
-
-
- ) - }} -
-
- - setDatabaseOperationsModalData(defaultDatabaseOperation)} - onRequestClose={() => setDatabaseOperationsModalData(defaultDatabaseOperation)} - > -
{databaseOperationsModalData.index === -1 ? 'Add' : 'Update'}
- - { - setSubmitting(true) - await putChartJsonItem({ - chartCode: listFormValues.listFormCode, - id: listFormValues.id, - index: databaseOperationsModalData.index, - fieldName: 'annotation', - itemAnnotation: { ...values }, - }) - toast.push( - - {databaseOperationsModalData.index === -1 - ? 'Kayıt eklendi.' - : 'Kayıt Değiştirildi.'} - , - { - placement: 'top-end', - }, - ) - - getListFormValues() - setSubmitting(false) - setDatabaseOperationsModalData(defaultDatabaseOperation) - }} - > - {({ touched, errors, resetForm, isSubmitting, values }) => ( -
- -
- - - General - Border - - - - - - - - - {({ field, form }: FieldProps) => ( - option.value === values.series)} - onChange={(option) => form.setFieldValue(field.name, option?.value)} - /> - )} - - - - - - - - - - - - - - - - - - - - - - - - - - {({ field, form }: FieldProps) => ( - option.value === values.border.dashStyle, - )} - onChange={(option) => form.setFieldValue(field.name, option?.value)} - /> - )} - - - - - - - - -
-
- -
-
-
- )} -
-
- - setConfirmDelete(defaultConfirmDelete)} - onRequestClose={() => setConfirmDelete(defaultConfirmDelete)} - > -
Delete
- -

Silmek istediğinize emin misiniz?

- -
- - -
-
) : ( <> diff --git a/ui/src/views/admin/listForm/edit/FormTabCommands.tsx b/ui/src/views/admin/listForm/edit/FormTabCommands.tsx index cd7722a6..3eae4b3b 100644 --- a/ui/src/views/admin/listForm/edit/FormTabCommands.tsx +++ b/ui/src/views/admin/listForm/edit/FormTabCommands.tsx @@ -9,7 +9,7 @@ import { ListFormEditTabs } from '@/proxy/admin/list-form/models' import { useStoreState } from '@/store' import { useLocalization } from '@/utils/hooks/useLocalization' import { useState } from 'react' -import { FaEdit, FaFileMedical, FaTrash } from 'react-icons/fa'; +import { FaEdit, FaFileMedical, FaTrash } from 'react-icons/fa' import JsonRowOpDialogCommand from './json-row-operations/JsonRowOpDialogCommand' import { JsonRowDialogData } from './json-row-operations/types' import { UiCommandButtonPositionTypeEnum } from '@/proxy/form/models' diff --git a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAnnotation.tsx b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAnnotation.tsx new file mode 100644 index 00000000..c7533420 --- /dev/null +++ b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAnnotation.tsx @@ -0,0 +1,478 @@ +import { + Button, + Checkbox, + Dialog, + FormContainer, + FormItem, + Input, + Notification, + Select, + Tabs, + toast, +} from '@/components/ui' +import { ListFormJsonRowDto } from '@/proxy/admin/list-form/models' +import { SelectBoxOption } from '@/shared/types' +import { useStoreActions, useStoreState } from '@/store' +import { useLocalization } from '@/utils/hooks/useLocalization' +import { Field, FieldProps, Form, Formik } from 'formik' +import { Dispatch, SetStateAction, useEffect, useState } from 'react' +import { number, object, string } from 'yup' +import { JsonRowDialogData } from './types' +import { + deleteListFormJsonRow, + getListFormJsonRow, + postListFormJsonRow, + putListFormJsonRow, +} from '@/services/admin/list-form.service' +import TabContent from '@/components/ui/Tabs/TabContent' +import TabList from '@/components/ui/Tabs/TabList' +import TabNav from '@/components/ui/Tabs/TabNav' +import { + chartAnnotationTypeListOptions, + chartTitleWordWrapListOptions, + chartSeriesDashStyleOptions, +} from '../options' + +const schema = object().shape({ + name: string().required('Name Required'), + backgroundColor: string().notRequired(), + height: number().notRequired(), +}) + +function JsonRowOpDialogAnnotation({ + isOpen, + setIsOpen, + data, + setData, +}: { + isOpen: boolean + setIsOpen: Dispatch> + data: JsonRowDialogData | undefined + setData: Dispatch> +}) { + const [permissionOptions, setPermissionOptions] = useState([]) + const { translate } = useLocalization() + + const permissions: Record | undefined = useStoreState( + (state) => state.abpConfig.config?.auth.grantedPolicies, + ) + + useEffect(() => { + if (permissions) { + setPermissionOptions( + Object.keys(permissions).map((key) => { + return { + value: key, + label: key, + } + }), + ) + } + }, [permissions]) + + const { setJsonValue } = useStoreActions((a) => a.admin) + + const handleClose = async (e?: any) => { + if (e) { + e.preventDefault() + } + + if (data) { + const resp = await getListFormJsonRow(data.id, data.tabName) + setJsonValue({ field: 'panesDto', data: resp.data }) + } + + setData(undefined) + setIsOpen(false) + } + + if (!data) { + return null + } + + return ( + + {(data.operation === 'create' || data.operation === 'update') && ( + <> +
{data.index === -1 ? 'Add' : 'Update'}
+ { + setSubmitting(true) + try { + const input: ListFormJsonRowDto = { + index: data.index, + fieldName: data.tabName, + itemChartAnnotation: values, + } + if (data.index === -1) { + await postListFormJsonRow(data.id, input) + } else { + await putListFormJsonRow(data.id, input) + } + toast.push( + + {data.index === -1 ? 'Kayıt eklendi' : 'Kayıt güncellendi'} + , + { placement: 'top-end' }, + ) + handleClose() + } catch (error: any) { + toast.push( + + Hata + {error} + , + { placement: 'top-end' }, + ) + } finally { + setSubmitting(false) + } + }} + > + {({ touched, errors, values, isSubmitting }) => ( +
+ +
+ + + General + Border + + + + + + + + + {({ field, form }: FieldProps) => ( + option.value === values.series, + // )} + // onChange={(option) => form.setFieldValue(field.name, option?.value)} + /> + )} + + + + + + + + + + + + + + + + + + + + + + + + + + {({ field, form }: FieldProps) => ( + option.value === values.border.dashStyle, + )} + onChange={(option) => form.setFieldValue(field.name, option?.value)} + /> + )} + + + + + + + + +
+
+ + +
+
+
+ )} +
+ + )} + {data.operation === 'delete' && ( + <> +
Delete
+

Silmek istediğinize emin misiniz?

+ { + setSubmitting(true) + try { + await deleteListFormJsonRow(data.id, data.tabName, values.index) + toast.push(Kayıt silindi , { + placement: 'top-end', + }) + handleClose() + } catch (error: any) { + toast.push( + + Hata + {error} + , + { placement: 'top-end' }, + ) + } finally { + setSubmitting(false) + } + }} + > + {({ isSubmitting }) => ( +
+ +
+ + +
+
+
+ )} +
+ + )} +
+ ) +} + +export default JsonRowOpDialogAnnotation diff --git a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAxis.tsx b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAxis.tsx new file mode 100644 index 00000000..39ccefe7 --- /dev/null +++ b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogAxis.tsx @@ -0,0 +1,465 @@ +import { + Button, + Checkbox, + Dialog, + FormContainer, + FormItem, + Input, + Notification, + Select, + Tabs, + toast, +} from '@/components/ui' +import { ListFormJsonRowDto } from '@/proxy/admin/list-form/models' +import { SelectBoxOption } from '@/shared/types' +import { useStoreActions } from '@/store' +import { useLocalization } from '@/utils/hooks/useLocalization' +import { Field, FieldArray, FieldProps, Form, Formik, FormikProps } from 'formik' +import { Dispatch, SetStateAction, useEffect, useState } from 'react' +import { getIn, number, object, string } from 'yup' +import { JsonRowDialogData } from './types' +import { + deleteListFormJsonRow, + getListFormJsonRow, + postListFormJsonRow, + putListFormJsonRow, +} from '@/services/admin/list-form.service' +import TabContent from '@/components/ui/Tabs/TabContent' +import { FaMinus } from 'react-icons/fa' +import TabList from '@/components/ui/Tabs/TabList' +import TabNav from '@/components/ui/Tabs/TabNav' +import { IdentityRoleDto } from '@/proxy/admin/models' +import { + chartArgumentAxisTypeListOptions, + chartArgumentAxisPositionListOptions, + chartBreakStyleLineListOptions, +} from '../options' +import { BreakDto } from '@/proxy/admin/charts/models' + +const schema = object().shape({ + name: string().required('Name Required'), + backgroundColor: string().notRequired(), + height: number().notRequired(), +}) + +function JsonRowOpDialogAxis({ + isOpen, + setIsOpen, + data, + setData, +}: { + isOpen: boolean + setIsOpen: Dispatch> + data: JsonRowDialogData | undefined + setData: Dispatch> +}) { + const { translate } = useLocalization() + const { setJsonValue } = useStoreActions((a) => a.admin) + + const handleClose = async (e?: any) => { + if (e) { + e.preventDefault() + } + + if (data) { + const resp = await getListFormJsonRow(data.id, data.tabName) + setJsonValue({ field: 'axisDto', data: resp.data }) + } + + setData(undefined) + setIsOpen(false) + } + + const fieldFeedback = (form: FormikProps, name: string) => { + const error = getIn(form.errors, name) + const touch = getIn(form.touched, name) + return { + errorMessage: error || '', + invalid: typeof touch === 'undefined' ? false : error && touch, + } + } + + if (!data) { + return null + } + + return ( + + {(data.operation === 'create' || data.operation === 'update') && ( + <> +
{data.index === -1 ? 'Add' : 'Update'}
+ { + setSubmitting(true) + try { + const input: ListFormJsonRowDto = { + index: data.index, + fieldName: data.tabName, + itemChartValueAxis: values, + } + if (data.index === -1) { + await postListFormJsonRow(data.id, input) + } else { + await putListFormJsonRow(data.id, input) + } + toast.push( + + {data.index === -1 ? 'Kayıt eklendi' : 'Kayıt güncellendi'} + , + { placement: 'top-end' }, + ) + handleClose() + } catch (error: any) { + toast.push( + + Hata + {error} + , + { placement: 'top-end' }, + ) + } finally { + setSubmitting(false) + } + }} + > + {({ touched, errors, values, isSubmitting }) => { + const breaks = values.breaks + + return ( +
+ +
+ + + + + + + {({ field, form }: FieldProps) => ( + option.value === values.type, + )} + onChange={(option) => form.setFieldValue(field.name, option?.value)} + /> + )} + + + + + + {({ field, form }: FieldProps) => ( + option.value === values.breakStyle.line, + )} + onChange={(option) => + form.setFieldValue(field.name, option?.value) + } + /> + )} + + + + + + {({ form, remove, push }) => ( +
+ {breaks && breaks.length > 0 + ? breaks.map((_, index) => { + const startValueFeedBack = fieldFeedback( + form, + `breaks[${index}].startValue`, + ) + const endValueFeedBack = fieldFeedback( + form, + `breaks[${index}].endValue`, + ) + + return ( +
+ + + + + + + + +
+ ) + }) + : null} +
+ +
+
+ )} +
+
+
+ + +
+ + +
+
+
+ ) + }} +
+ + )} + {data.operation === 'delete' && ( + <> +
Delete
+

Silmek istediğinize emin misiniz?

+ { + setSubmitting(true) + try { + await deleteListFormJsonRow(data.id, data.tabName, values.index) + toast.push(Kayıt silindi , { + placement: 'top-end', + }) + handleClose() + } catch (error: any) { + toast.push( + + Hata + {error} + , + { placement: 'top-end' }, + ) + } finally { + setSubmitting(false) + } + }} + > + {({ isSubmitting }) => ( +
+ +
+ + +
+
+
+ )} +
+ + )} +
+ ) +} + +export default JsonRowOpDialogAxis diff --git a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogPane.tsx b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogPane.tsx new file mode 100644 index 00000000..2f69c85c --- /dev/null +++ b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogPane.tsx @@ -0,0 +1,209 @@ +import { + Button, + Dialog, + FormContainer, + FormItem, + Input, + Notification, + Select, + Tabs, + toast, +} from '@/components/ui' +import { ListFormJsonRowDto } from '@/proxy/admin/list-form/models' +import { SelectBoxOption } from '@/shared/types' +import { useStoreActions, useStoreState } from '@/store' +import { useLocalization } from '@/utils/hooks/useLocalization' +import { Field, Form, Formik } from 'formik' +import { Dispatch, SetStateAction, useEffect, useState } from 'react' +import { number, object, string } from 'yup' +import { JsonRowDialogData } from './types' +import { + deleteListFormJsonRow, + getListFormJsonRow, + postListFormJsonRow, + putListFormJsonRow, +} from '@/services/admin/list-form.service' + +const schema = object().shape({ + name: string().required('Name Required'), + backgroundColor: string().notRequired(), + height: number().notRequired(), +}) + +function JsonRowOpDialogPane({ + isOpen, + setIsOpen, + data, + setData, +}: { + isOpen: boolean + setIsOpen: Dispatch> + data: JsonRowDialogData | undefined + setData: Dispatch> +}) { + const { translate } = useLocalization() + const { setJsonValue } = useStoreActions((a) => a.admin) + + const handleClose = async (e?: any) => { + if (e) { + e.preventDefault() + } + + if (data) { + const resp = await getListFormJsonRow(data.id, data.tabName) + setJsonValue({ field: 'panesDto', data: resp.data }) + } + + setData(undefined) + setIsOpen(false) + } + + if (!data) { + return null + } + + return ( + + {(data.operation === 'create' || data.operation === 'update') && ( + <> +
{data.index === -1 ? 'Add' : 'Update'}
+ { + console.log('submit', values) + setSubmitting(true) + try { + const input: ListFormJsonRowDto = { + index: data.index, + fieldName: data.tabName, + itemChartPane: values, + } + if (data.index === -1) { + await postListFormJsonRow(data.id, input) + } else { + await putListFormJsonRow(data.id, input) + } + toast.push( + + {data.index === -1 ? 'Kayıt eklendi' : 'Kayıt güncellendi'} + , + { placement: 'top-end' }, + ) + handleClose() + } catch (error: any) { + toast.push( + + Hata + {error} + , + { placement: 'top-end' }, + ) + } finally { + setSubmitting(false) + } + }} + > + {({ touched, errors, values, isSubmitting }) => ( +
+ +
+ + + + + + + + + + + +
+
+ + +
+
+
+ )} +
+ + )} + {data.operation === 'delete' && ( + <> +
Delete
+

Silmek istediğinize emin misiniz?

+ { + setSubmitting(true) + try { + await deleteListFormJsonRow(data.id, data.tabName, values.index) + toast.push(Kayıt silindi , { + placement: 'top-end', + }) + handleClose() + } catch (error: any) { + toast.push( + + Hata + {error} + , + { placement: 'top-end' }, + ) + } finally { + setSubmitting(false) + } + }} + > + {({ isSubmitting }) => ( +
+ +
+ + +
+
+
+ )} +
+ + )} +
+ ) +} + +export default JsonRowOpDialogPane diff --git a/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogSeries.tsx b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogSeries.tsx new file mode 100644 index 00000000..cbbc279a --- /dev/null +++ b/ui/src/views/admin/listForm/edit/json-row-operations/JsonRowOpDialogSeries.tsx @@ -0,0 +1,453 @@ +import { + Button, + Card, + Checkbox, + Dialog, + FormContainer, + FormItem, + Input, + Notification, + Select, + toast, +} from '@/components/ui' +import { ListFormJsonRowDto } from '@/proxy/admin/list-form/models' +import { SelectBoxOption } from '@/shared/types' +import { useStoreActions } from '@/store' +import { useLocalization } from '@/utils/hooks/useLocalization' +import { Field, FieldProps, Form, Formik } from 'formik' +import { Dispatch, SetStateAction, useEffect, useState } from 'react' +import { number, object, string } from 'yup' +import { JsonRowDialogData } from './types' +import { + deleteListFormJsonRow, + getListFormJsonRow, + postListFormJsonRow, + putListFormJsonRow, +} from '@/services/admin/list-form.service' +import { tooltipFormatListOptions } from '@/shared/options' +import { + chartSeriesDashStyleOptions, + chartSeriesSelectionModeOptions, + chartSeriesTypeOptions, +} from '../options' + +const schema = object().shape({ + name: string().required('Name Required'), + backgroundColor: string().notRequired(), + height: number().notRequired(), +}) + +function JsonRowOpDialogSeries({ + isOpen, + setIsOpen, + data, + setData, +}: { + isOpen: boolean + setIsOpen: Dispatch> + data: JsonRowDialogData | undefined + setData: Dispatch> +}) { + const { translate } = useLocalization() + const { setJsonValue } = useStoreActions((a) => a.admin) + + const handleClose = async (e?: any) => { + if (e) { + e.preventDefault() + } + + if (data) { + const resp = await getListFormJsonRow(data.id, data.tabName) + setJsonValue({ field: 'panesDto', data: resp.data }) + } + + setData(undefined) + setIsOpen(false) + } + + // const valueAxisList = () => { + // return data?.chartPaneValues?.map((key: ChartValueAxisDto) => ({ + // value: key.name, + // label: key.name, + // })) + // } + + // const valuePaneList = () => { + // return data?.chartPaneValues?.map((key: ChartPanesDto) => ({ + // value: key.name, + // label: key.name, + // })) + // } + + // const SeriesList = () => { + // return data?.chartSeriesValues?.map((key: ChartSeriesDto) => ({ + // value: key.name, + // label: key.name, + // })) + // } + + if (!data) { + return null + } + + return ( + + {(data.operation === 'create' || data.operation === 'update') && ( + <> +
{data.index === -1 ? 'Add' : 'Update'}
+ { + setSubmitting(true) + try { + console.log(values) + const input: ListFormJsonRowDto = { + index: data.index, + fieldName: data.tabName, + itemChartSerie: values, + } + if (data.index === -1) { + await postListFormJsonRow(data.id, input) + } else { + await putListFormJsonRow(data.id, input) + } + toast.push( + + {data.index === -1 ? 'Kayıt eklendi' : 'Kayıt güncellendi'} + , + { placement: 'top-end' }, + ) + handleClose() + } catch (error: any) { + toast.push( + + Hata + {error} + , + { placement: 'top-end' }, + ) + } finally { + setSubmitting(false) + } + }} + > + {({ touched, errors, values, isSubmitting }) => ( +
+ +
+ + + + + + + + + + + + + + + {({ field, form }: FieldProps) => ( + option.value === values.axis)} + // onChange={(option) => form.setFieldValue(field.name, option?.value)} + /> + )} + + + + + + {({ field, form }: FieldProps) => ( + option.value === values.dashStyle, + )} + onChange={(option) => form.setFieldValue(field.name, option?.value)} + /> + )} + + + + + + + + + + {({ field, form }: FieldProps) => ( + option.value === values.label.format, + )} + onChange={(option) => form.setFieldValue(field.name, option?.value)} + /> + )} + + + + + + + +
+
+ + +
+
+
+ )} +
+ + )} + {data.operation === 'delete' && ( + <> +
Delete
+

Silmek istediğinize emin misiniz?

+ { + setSubmitting(true) + try { + await deleteListFormJsonRow(data.id, data.tabName, values.index) + toast.push(Kayıt silindi , { + placement: 'top-end', + }) + handleClose() + } catch (error: any) { + toast.push( + + Hata + {error} + , + { placement: 'top-end' }, + ) + } finally { + setSubmitting(false) + } + }} + > + {({ isSubmitting }) => ( +
+ +
+ + +
+
+
+ )} +
+ + )} +
+ ) +} + +export default JsonRowOpDialogSeries diff --git a/ui/src/views/admin/listForm/edit/json-row-operations/types.ts b/ui/src/views/admin/listForm/edit/json-row-operations/types.ts index 48506d27..c71eae51 100644 --- a/ui/src/views/admin/listForm/edit/json-row-operations/types.ts +++ b/ui/src/views/admin/listForm/edit/json-row-operations/types.ts @@ -1,3 +1,9 @@ +import { + ChartAnnotationDto, + ChartPanesDto, + ChartSeriesDto, + ChartValueAxisDto, +} from '@/proxy/admin/charts/models' import { ListFormEditTabs } from '@/proxy/admin/list-form/models' import { CommandColumnDto, @@ -22,4 +28,8 @@ export interface JsonRowDialogData { subFormValues?: SubFormDto widgetValues?: WidgetEditDto extraFilterValues?: ExtraFilterEditDto + chartPaneValues?: ChartPanesDto + chartSeriesValues?: ChartSeriesDto + chartValueAxisValues?: ChartValueAxisDto + chartAnnotationValues?: ChartAnnotationDto } diff --git a/ui/src/views/chart/Chart.tsx b/ui/src/views/chart/Chart.tsx index 8c868b81..af68321b 100644 --- a/ui/src/views/chart/Chart.tsx +++ b/ui/src/views/chart/Chart.tsx @@ -7,50 +7,60 @@ import DxChart from 'devextreme-react/chart' import { useEffect, useState } from 'react' import { Helmet } from 'react-helmet' import { useParams, useSearchParams } from 'react-router-dom' -import { getChartOptionsDto } from './utils' -import { getChartOptions } from '@/services/chart.service' +import { useListFormCustomDataSource } from '@/shared/useListFormCustomDataSource' +import CustomStore from 'devextreme/data/custom_store' +import { GridDto } from '@/proxy/form/models' interface ChartProps extends CommonProps, Meta { - chartCode: string + listFormCode: string + filter?: string isSubForm?: boolean level?: number refreshData?: () => Promise - filter?: string + gridDto?: GridDto } const Chart = (props: ChartProps) => { - const { isSubForm, level } = props + const { listFormCode, filter, isSubForm, level, gridDto } = props + const [gridDataSource, setGridDataSource] = useState>() const [searchParams] = useSearchParams() + const { createSelectDataSource } = useListFormCustomDataSource({}) const params = useParams() - const _chartCode = props?.chartCode ?? params?.chartCode ?? '' + const _listFormCode = props?.listFormCode ?? params?.listFormCode ?? '' const { translate } = useLocalization() - const [chartOptions, setChartOptions] = useState() useEffect(() => { - const getChart = async () => { - if (!_chartCode) return + if (!gridDto) return - const res = await getChartOptions(_chartCode) - const chartOpt = getChartOptionsDto(_chartCode, res.data, props?.filter) - setChartOptions(chartOpt) - } + const dataSource = createSelectDataSource(gridDto.gridOptions, listFormCode, searchParams) + setGridDataSource(dataSource) + }, [gridDto, searchParams]) - getChart() - }, [_chartCode]) + // useEffect(() => { + // const getChart = async () => { + // if (!_listFormCode) return + + // const res = await getListFormByCode(_listFormCode) + // const chartOpt = getChartOptionsDto(_listFormCode, res.data, props?.filter) + // setChartOptions(chartOpt) + // } + + // getChart() + // }, [_listFormCode]) return ( - {!isSubForm && chartOptions && ( + {!isSubForm && gridDto && ( )} - {_chartCode && chartOptions && ( - + {_listFormCode && gridDto?.gridOptions && ( + )} ) diff --git a/ui/src/views/chart/utils.ts b/ui/src/views/chart/utils.ts index cfbb5014..c9f05860 100644 --- a/ui/src/views/chart/utils.ts +++ b/ui/src/views/chart/utils.ts @@ -1,60 +1,60 @@ -import CustomStore from 'devextreme/data/custom_store' -import { ChartDto } from '../../proxy/charts/models' -import { getChartSelect } from '../../services/chart.service' +// import CustomStore from 'devextreme/data/custom_store' +// import { ChartDto } from '../../proxy/admin/charts/models' +// import { getChartSelect } from '../../services/chart.service' -export function getChartOptionsDto(chartCode: string, chartDto: ChartDto, filter?: string) { - if (!chartDto || !chartCode) { - return undefined - } +// export function getChartOptionsDto(listFormCode: string, chartDto: ChartDto, filter?: string) { +// if (!chartDto || !listFormCode) { +// return undefined +// } - const dataSource = { - store: new CustomStore({ - load: () => { - return getChartSelect(chartCode, filter) - }, - }), - filter: null, - paginate: false, - } +// const dataSource = { +// store: new CustomStore({ +// load: () => { +// return getChartSelect(listFormCode, filter) +// }, +// }), +// filter: null, +// paginate: false, +// } - const options = { - dataSource: dataSource, +// const options = { +// dataSource: dataSource, - adjustOnZoom: chartDto.commonDto?.adjustOnZoom ?? true, - containerBackgroundColor: chartDto.commonDto?.containerBackgroundColor ?? '#FFFFFF', - disabled: chartDto.commonDto?.disabled ?? false, - palette: chartDto.commonDto?.palette ?? 'Material', - paletteExtensionMode: chartDto.commonDto?.paletteExtensionMode ?? 'blend', - //theme: s(chartDto.commonDto?.theme, 'generic.light'), +// adjustOnZoom: chartDto.commonDto?.adjustOnZoom ?? true, +// containerBackgroundColor: chartDto.commonDto?.containerBackgroundColor ?? '#FFFFFF', +// disabled: chartDto.commonDto?.disabled ?? false, +// palette: chartDto.commonDto?.palette ?? 'Material', +// paletteExtensionMode: chartDto.commonDto?.paletteExtensionMode ?? 'blend', +// //theme: s(chartDto.commonDto?.theme, 'generic.light'), - title: chartDto.titleDto, - size: chartDto.sizeDto?.useSize ? chartDto.sizeDto : null, - legend: chartDto.legendDto, - margin: chartDto.marginDto, - adaptiveLayout: chartDto.adaptivelayoutDto, - defaultPane: chartDto.commonDto?.defaultPane, +// title: chartDto.titleDto, +// size: chartDto.sizeDto?.useSize ? chartDto.sizeDto : null, +// legend: chartDto.legendDto, +// margin: chartDto.marginDto, +// adaptiveLayout: chartDto.adaptivelayoutDto, +// defaultPane: chartDto.commonDto?.defaultPane, - scrollBar: chartDto.scrollBarDto, - zoomAndPan: chartDto.zoomAndPanDto, - animation: chartDto.animationDto, - export: chartDto.exportDto, - crosshair: chartDto.crosshairDto, - argumentAxis: chartDto.argumentAxisDto, - valueAxis: chartDto.valueAxisDto, - tooltip: chartDto.tooltipDto, +// scrollBar: chartDto.scrollBarDto, +// zoomAndPan: chartDto.zoomAndPanDto, +// animation: chartDto.animationDto, +// export: chartDto.exportDto, +// crosshair: chartDto.crosshairDto, +// argumentAxis: chartDto.argumentAxisDto, +// valueAxis: chartDto.valueAxisDto, +// tooltip: chartDto.tooltipDto, - panes: chartDto.panesDto?.length > 0 ? chartDto.panesDto : undefined, - series: chartDto.seriesDto?.length > 0 ? chartDto.seriesDto : undefined, - commonSeriesSettings: chartDto.commonSeriesSettingsDto, - commonPaneSettings: chartDto.commonPaneSettingsDto, - commonAxisSettings: chartDto.commonAxisSettingsDto, - annotations: chartDto.annotationsDto, - commonAnnotationSettings: chartDto.commonAnnotationSettingsDto, +// panes: chartDto.panesDto?.length > 0 ? chartDto.panesDto : undefined, +// series: chartDto.seriesDto?.length > 0 ? chartDto.seriesDto : undefined, +// commonSeriesSettings: chartDto.commonSeriesSettingsDto, +// commonPaneSettings: chartDto.commonPaneSettingsDto, +// commonAxisSettings: chartDto.commonAxisSettingsDto, +// annotations: chartDto.annotationsDto, +// commonAnnotationSettings: chartDto.commonAnnotationSettingsDto, - loadingIndicator: { - enabled: true, - }, - } +// loadingIndicator: { +// enabled: true, +// }, +// } - return options -} +// return options +// } diff --git a/ui/src/views/dashboard/WidgetBarChart.tsx b/ui/src/views/dashboard/WidgetBarChart.tsx index 5e682326..3df73c3c 100644 --- a/ui/src/views/dashboard/WidgetBarChart.tsx +++ b/ui/src/views/dashboard/WidgetBarChart.tsx @@ -18,7 +18,7 @@ const WidgetBarChart = ({ diff --git a/ui/src/views/form/SubForms.tsx b/ui/src/views/form/SubForms.tsx index 45c679aa..5436f538 100644 --- a/ui/src/views/form/SubForms.tsx +++ b/ui/src/views/form/SubForms.tsx @@ -181,7 +181,7 @@ const SubForms = (props: { ))} {subForm.tabType == SubFormTabTypeEnum.Chart && (