Jump to content
JChartFX Community

Falkon

Members
  • Posts

    3
  • Joined

  • Last visited

Falkon's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Hello, I would like to know how to change the default color values of the charts. We have several pie charts and we would like the individual section colors to be different. According to the following thread: http://community.jchartfx.com/topic/293-css-vs-api-property-settings/ JuanC apparently mentioned that in future builds, all we would have to do is declare an array with the colors we would want to use (the last post in that thread). Is this possible now? If so, how do I do this? Thanks a lot! -Falkon
  2. We have a data set with multiple fields, where only one field is displayed in a pie chart, but all of them are displayed in the mouseover tooltip. Following samples from both http://community.jchartfx.com/topic/248-tooltip/ and http://community.jchartfx.com/topic/129-formatting-default-tooltip/, we created a content template for the tooltip. Everything shows up nicely, except the values in the tooltip, which display 'ABC' for Total Severity, Total Units, and Average Severity. Is the format for the content templates documented anywhere? What do we need to do to have this data displaying correctly? var data = [{'Group':'Automobile', 'Type':'Total Loss', 'Amount':6000.00, 'Units':4, 'Average':1500.00}, {'Group':'Automobile', 'Type':'Repairable', 'Amount':40500.00, 'Units':27, 'Average':1500.00}]; var chart = new cfx.Chart(); chart.setGallery(cfx.Gallery.Pie); chart.getGalleryAttributes().setExplodingMode(cfx.ExplodingMode.All); chart.getView3D().setEnabled(true); chart.getAxisY().getLabelsFormat().setFormat(cfx.AxisFormat.Currency); var fields = chart.getDataSourceSettings().getFields(); var field = new cfx.FieldMap(); field.setName('Group'); field.setUsage(cfx.FieldUsage.ColumnHeading); fields.add(field); field = new cfx.FieldMap(); field.setName('Type'); field.setUsage(cfx.FieldUsage.RowHeading); fields.add(field); field = new cfx.FieldMap(); field.setName('Amount'); field.setUsage(cfx.FieldUsage.Value); fields.add(field); var contentTemplate = '<DataTemplate>' + '<DockPanel Orientation="Vertical">' + '<DockPanel Orientation="Horizontal" Margin="3,0,3,0">' + '<TextBlock Text="{Binding Path=SeriesT}" Margin="0,0,4,0"/>' + '<TextBlock Text="{Binding Path=Value}" FontWeight="Bold" HorizontalAlignment="Right"/>' + '</DockPanel>' + '<DockPanel Orientation="Horizontal" Margin="3,0,3,0">' + '<TextBlock Text="Total Severity: " Margin="0,0,4,0"/>' + '<TextBlock Text="{Binding Path=DataAmount}" FontWeight="Bold" HorizontalAlignment="Right"/>' + '</DockPanel>' + '<DockPanel Orientation="Horizontal" Margin="3,0,3,0">' + '<TextBlock Text="Total Units: " Margin="0,0,4,0"/>' + '<TextBlock Text="{Binding Path=DataUnits}" FontWeight="Bold" HorizontalAlignment="Right"/>' + '</DockPanel>' + '<DockPanel Orientation="Horizontal" Margin="3,0,3,0">' + '<TextBlock Text="Average Severity: " Margin="0,0,4,0"/>' + '<TextBlock Text="{Binding Path=DataAverage}" FontWeight="Bold" HorizontalAlignment="Right"/>' + '</DockPanel>' + '</DockPanel>' + '</DataTemplate>'; chart.getToolTips().setContentTemplate(contentTemplate); var crosstab = new cfx.data.CrosstabDataProvider(); crosstab.setDataSource(data); chart.setDataSource(crosstab); chart.getAllSeries().getPointLabels().setVisible(true); chart.create('divYtdChart2'); We are using version7.2.5289.19355 and have tested on Internet Explorer and Chrome.
  3. Hello, We've been trying to get a custom tool tip to display using the tutorial provided in your documentation at this link: http://support.softwarefx.com/jChartFX/article/2501235#!2501064 However, we are experiencing a really weird error in having the correct tool tip to display. We have multiple charts in one page. Only one of them has a custom ToolTip. If we mouse over the only graph with the custom ToolTip, we can see the expected custom ToolTip just fine. But, if we mouse over another graph first that has a standard ToolTip and then mouse over the graph that contains the custom ToolTip, we see the standard ToolTip from the previous graph and not the custom ToolTip from the graph we are currently mousing over! This is very bizarre. Any help would be appreciated. Let us know if you would like to see my code or anything else. Thanks.
×
×
  • Create New...