Jump to content
JChartFX Community
  • 0

Tooltip problem with date on X


daimone
 Share

Question

Hi,

I'm using jChartFx 7.1 for my thesis and I'm facing a strange problem. If I use date on X axis, the tooltip doesn't show the X value.

In particular, if I use another kind of value for X axis, for example a sequence, the tooltip shows in its first line the value of the X axis and then a value for each series. When I switch to date this first line disappears and I only get series values.

Another undesired behavior is this: if I display the tooltip between two points while using a sequence on X, the tooltip show the value of the two adjacent points (for example "series1: 10-5"), but again if I switch to date on X axis the tooltip only shows a "-" after the name of the serie.

 Is there a way to fix these two problem? I've tryed to customize tooltip message but it seems very hard to understand how I can achieve this.

Thank you

 

 

 

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

I want to format the default tooltip of pie to this:

<SeriesName>

<value> out of <total value> //=== but I want this on zero decimal places format (eg.: 2 out of 10)

while the point label is in percentage with 2 decimal places (eg: 14.29%)

my code is:

 Chart;

        function LoadChart() {
            Chart = new cfx.Chart();
            Chart.setGallery(cfx.Gallery.Pie);
            Chart.getAnimations().getLoad().setEnabled(true);
            Chart.getLegendBox().setVisible(false);
            var allSeries = Chart.getAllSeries();
            var myPie = (Chart.getGalleryAttributes());
            var pointLabels = allSeries.getPointLabels();

            //myPie.setExplodingMode(cfx.ExplodingMode.All);

            //myPie.setSquare(true); 

            Chart.getAxisY().getDataFormat().setDecimals(2);
            
            myPie.setMaximumLabelMargin(0);
            pointLabels.setVisible(true);
            myPie.setLabelsInside(true);
            pointLabels.setFormat("%p%%");
            Chart.getAllSeries().getPointLabels().setRichText(true);
            Chart.setDataSource(result);

            Chart.getPlotAreaMargin().setTop(0);
            Chart.getPlotAreaMargin().setBottom(0);
            Chart.getPlotAreaMargin().setRight(0);
            Chart.getPlotAreaMargin().setLeft(0);

            var divHolder = document.getElementById('divChart');
            Chart.create(divHolder);
        }
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...